class MockRequest(object):
Wraps a requests.Request
to mimic a urllib2.Request
.
The code in cookielib.CookieJar
expects this interface in order to correctly
manage cookie policies, i.e., determine whether a cookie can be set, given the
domains of the request and the cookie.
The original request object is read-only. The client is responsible for collecting
the new headers via get_new_headers()
and interpreting them appropriately. You
probably want get_cookie_header
, defined below.
Method | __init__ |
Undocumented |
Method | add_header |
cookielib has no legitimate use for this method; add it back if you find one. |
Method | add_unredirected_header |
Undocumented |
Method | get_full_url |
Undocumented |
Method | get_header |
Undocumented |
Method | get_host |
Undocumented |
Method | get_new_headers |
Undocumented |
Method | get_origin_req_host |
Undocumented |
Method | get_type |
Undocumented |
Method | has_header |
Undocumented |
Method | is_unverifiable |
Undocumented |
Instance Variable | _new_headers |
Undocumented |
Instance Variable | _r |
Undocumented |
Instance Variable | type |
Undocumented |
Property | host |
Undocumented |
Property | origin_req_host |
Undocumented |
Property | unverifiable |
Undocumented |