class documentation

class MockRequest(object):

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 ​_new​_headers Undocumented
Instance Variable ​_r Undocumented
Instance Variable type Undocumented
Property host Undocumented
Property origin​_req​_host Undocumented
Property unverifiable Undocumented
def __init__(self, request):

Undocumented

def add_header(self, key, val):
cookielib has no legitimate use for this method; add it back if you find one.
def add_unredirected_header(self, name, value):

Undocumented

def get_full_url(self):

Undocumented

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

Undocumented

def get_host(self):

Undocumented

def get_new_headers(self):

Undocumented

def get_origin_req_host(self):

Undocumented

def get_type(self):

Undocumented

def has_header(self, name):

Undocumented

def is_unverifiable(self):

Undocumented

_new_headers: dict =

Undocumented

_r =

Undocumented

type =

Undocumented

@property
host =

Undocumented

@property
origin_req_host =

Undocumented

@property
unverifiable =

Undocumented