urllib.request.UnknownHandler

class urllib.request.UnknownHandler A catch-all class to handle unknown URLs.

urllib.request.Request.type

Request.type The URI scheme.

urllib.request.Request.unverifiable

Request.unverifiable boolean, indicates whether the request is unverifiable as defined by RFC 2965.

urllib.request.Request.host

Request.host The URI authority, typically a host, but may also contain a port separated by a colon.

urllib.request.Request.origin_req_host

Request.origin_req_host The original host for the request, without port.

urllib.request.Request.method

Request.method The HTTP request method to use. By default its value is None, which means that get_method() will do its normal computation of the method to be used. Its value can be set (thus overriding the default computation in get_method()) either by providing a default value by setting it at the class level in a Request subclass, or by passing a value in to the Request constructor via the method argument. New in version 3.3. Changed in version 3.4: A default value can now be set in sub

urllib.request.Request.set_proxy()

Request.set_proxy(host, type) Prepare the request by connecting to a proxy server. The host and type will replace those of the instance, and the instance’s selector will be the original URL given in the constructor.

urllib.request.Request.remove_header()

Request.remove_header(header) Remove named header from the request instance (both from regular and unredirected headers). New in version 3.4.

urllib.request.Request.selector

Request.selector The URI path. If the Request uses a proxy, then selector will be the full URL that is passed to the proxy.

urllib.request.Request.has_header()

Request.has_header(header) Return whether the instance has the named header (checks both regular and unredirected).