Go to the latest version of this document.

# ``twisted`.`web`.`client`.`_FakeStdlibRequest``

class documentation

`class _FakeStdlibRequest(_RequestBase): (source)`

Constructor: `_FakeStdlibRequest(uri)`

View In Hierarchy

A fake `urllib.request.Request` object for `http.cookiejar` to work with.

See Also
urllib.request.Request

Present Since
11.1

Method | `__init__` | Create a fake request.
Method | `add_unredirected_header` | Undocumented
Method | `get_full_url` | Undocumented
Method | `get_header` | Undocumented
Method | `get_host` | Undocumented
Method | `get_type` | Undocumented
Method | `has_header` | Undocumented
Method | `is_unverifiable` | Undocumented
Instance Variable | `headers` | Request headers.
Instance Variable | `host` | The host[:port] of the URI.
Instance Variable | `origin_req_host` | Undocumented
Instance Variable | `type` | The scheme of the URI.
Instance Variable | `unverifiable` | Undocumented
Instance Variable | `uri` | Request URI.
Instance Variable | `_twistedHeaders` | Undocumented

def __init__(self, uri: `bytes`): (source)

Create a fake request.

Parameters
uri:`bytes` | Request URI.

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_type(self): (source)

Undocumented

def has_header(self, header): (source)

Undocumented

def is_unverifiable(self): (source)

Undocumented

headers = (source)

Request headers.

host: `str` = (source)

The host[:port] of the URI.

origin_req_host = (source)

Undocumented

type: `str` = (source)

The scheme of the URI.

unverifiable: `bool` = (source)

Undocumented

uri: `str` = (source)

Request URI.

_twistedHeaders: `Headers` = (source)

Undocumented