class documentation

class MockRequest: (source)

View In Hierarchy

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 type Undocumented
Property host Undocumented
Property origin_req_host Undocumented
Property unverifiable Undocumented
Instance Variable _new_headers Undocumented
Instance Variable _r Undocumented
def __init__(self, request): (source)

Undocumented

def add_header(self, key, val): (source)

cookielib has no legitimate use for this method; add it back if you find one.

def add_unredirected_header(self, name, value): (source)

Undocumented

def get_full_url(self): (source)

Undocumented

def get_header(self, name, default=None): (source)

Undocumented

def get_host(self): (source)

Undocumented

def get_new_headers(self): (source)

Undocumented

def get_origin_req_host(self): (source)

Undocumented

def get_type(self): (source)

Undocumented

def has_header(self, name): (source)

Undocumented

def is_unverifiable(self): (source)

Undocumented

Undocumented

Undocumented

@property
origin_req_host = (source)

Undocumented

@property
unverifiable = (source)

Undocumented

_new_headers: dict = (source)

Undocumented

Undocumented