def request(method, uri, headers=None, bodyProducer=None):
        """
        Request the resource at the given location.

        @param method: The request method to use, such as C{"GET"}, C{"HEAD"},
            C{"PUT"}, C{"POST"}, etc.
        @type method: L{bytes}

        @param uri: The location of the resource to request.  This should be an
            absolute URI but some implementations may support relative URIs
            (with absolute or relative paths).  I{HTTP} and I{HTTPS} are the
            schemes most likely to be supported but others may be as well.
        @type uri: L{bytes}

        @param headers: The headers to send with the request (or L{None} to
            send no extra headers).  An implementation may add its own headers
            to this (for example for client identification or content
            negotiation).
        @type headers: L{Headers} or L{None}

        @param bodyProducer: An object which can generate bytes to make up the
            body of this request (for example, the properly encoded contents of
            a file for a file upload).  Or, L{None} if the request is to have
            no body.
        @type bodyProducer: L{IBodyProducer} provider

        @return: A L{Deferred} that fires with an L{IResponse} provider when
            the header of the response has been received (regardless of the
            response status code) or with a L{Failure} if there is any problem
            which prevents that response from being received (including
            problems that prevent the request from being sent).
        @rtype: L{Deferred}
        """

        Request the resource at the given location.

        @param method: The request method to use, such as C{"GET"}, C{"HEAD"},
            C{"PUT"}, C{"POST"}, etc.
        @type method: L{bytes}

        @param uri: The location of the resource to request.  This should be an
            absolute URI but some implementations may support relative URIs
            (with absolute or relative paths).  I{HTTP} and I{HTTPS} are the
            schemes most likely to be supported but others may be as well.
        @type uri: L{bytes}

        @param headers: The headers to send with the request (or L{None} to
            send no extra headers).  An implementation may add its own headers
            to this (for example for client identification or content
            negotiation).
        @type headers: L{Headers} or L{None}

        @param bodyProducer: An object which can generate bytes to make up the
            body of this request (for example, the properly encoded contents of
            a file for a file upload).  Or, L{None} if the request is to have
            no body.
        @type bodyProducer: L{IBodyProducer} provider

        @return: A L{Deferred} that fires with an L{IResponse} provider when
            the header of the response has been received (regardless of the
            response status code) or with a L{Failure} if there is any problem
            which prevents that response from being received (including
            problems that prevent the request from being sent).
        @rtype: L{Deferred}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/iweb.py