'Represents an HTTP request.
:type method: string
:param method: The HTTP method name, \'GET\', \'POST\', \'PUT\' etc.
:type protocol: string
:param protocol: The http protocol used, \'http\' or \'https\'.
:type host: string
:param host: Host to which the request is addressed. eg. abc.com
:type port: int
:param port: port on which the request is being sent. Zero means unset,
in which case default port will be chosen.
:type path: string
:param path: URL path that is being accessed.
:type auth_path: string
:param path: The part of the URL path used when creating the
authentication string.
:type params: dict
:param params: HTTP url query parameters, with key as name of
the param, and value as value of param.
:type headers: dict
:param headers: HTTP headers, with key as name of the header and value
as value of header.
:type body: string
:param body: Body of the HTTP request. If not present, will be None or
empty string (\'\').'

def __init__(self, method, protocol, host, port, path, auth_path, params, headers, body):

    self.method = method
    self.protocol = protocol
    self.host = host
    self.port = port
    self.path = path
    if (auth_path is None):
        auth_path = path
    self.auth_path = auth_path
    self.params = params
    if (headers and ('Transfer-Encoding' in headers) and (headers['Transfer-Encoding'] == 'chunked') and (self.method != 'PUT')):
        self.headers = headers.copy()
        del self.headers['Transfer-Encoding']
    else:
        self.headers = headers
    self.body = body
