ganggu/httpkit.py
def request(method, url, **kwargs):
    """Constructs and sends an HTTP request.

    Args:
        method (str): Method for the request.
        url (str|callable): URL for the request. Or a callable should return
                            the URL.
        \*\*kwargs: Optional arguments that ``Session.request()`` takes.

    Returns:
        requests.Response: HTTP response.
    """
    # By using the 'with' statement we are sure the session is closed, thus we
    # avoid leaving sockets open which can trigger a ResourceWarning in some
    # cases, and look like a memory leak in others.
    with Session() as session:
        return session.request(method, url, **kwargs)
Constructs and sends an HTTP request.

    Args:
        method (str): Method for the request.
        url (str|callable): URL for the request. Or a callable should return
                            the URL.
        \*\*kwargs: Optional arguments that ``Session.request()`` takes.

    Returns:
        requests.Response: HTTP response.
    
Constructs and sends an HTTP request.
Constructs and sends an HTTP request .
def request(method, url, **kwargs):
    with Session() as session:
        return session.request(method, url, **kwargs)
def request ( method , url , ** kwargs ) : with Session ( ) as session : return session . request ( method , url , ** kwargs )
Constructs and sends an HTTP request.
Constructs and sends an HTTP request .
"""Constructs and sends an HTTP request.

    Args:
        method (str): Method for the request.
        url (str|callable): URL for the request. Or a callable should return
                            the URL.
        \*\*kwargs: Optional arguments that ``Session.request()`` takes.

    Returns:
        requests.Response: HTTP response.
    """ # By using the 'with' statement we are sure the session is closed, thus we # avoid leaving sockets open which can trigger a ResourceWarning in some # cases, and look like a memory leak in others.
None
requests.Response
method
Method for the request.
Method for the request .
url
URL for the request. Or a callable should return
the URL.
URL for the request . Or a callable should return the URL .
\*\*kwargs
Optional arguments that ``Session.request()`` takes.
Optional arguments that ` ` Session . request () ` ` takes .