ganggu/httpkit.py
def request(self, method, url, params=None, data=None, headers=None,
                cookies=None, files=None, auth=None, timeout=None,
                allow_redirects=True, proxies=None, hooks=None, stream=None,
                verify=None, cert=None, json=None):
        """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.
            params (bytes|dict): Dictionary or bytes to be sent in the query
                                 string for the request.
            data (bytes|dict|file): Dictionary, bytes, or file-like object to send
                                    in the body of the request.
            json (dict|list): JSON to send in the body of the request.
            headers (dict): Dictionary of HTTP Headers to send with the request.
            cookies (dict|CookieJar): Dict or CookieJar object to send with the request.
            files (dict): Dictionary of ``'filename': file-like-objects``
                          for multipart encoding upload.
            auth (tuple|callable): Auth tuple or callable to enable
                                   Basic/Digest/Custom HTTP Auth.
            timeout (float|tuple): How long to wait for the server to send
                                   data before giving up, as a float, or a (float, float) tuple.
            allow_redirects (bool):  Set to True by default.
            proxies (dict): Dictionary mapping protocol or protocol and
                            hostname to the URL of the proxy.
            stream (bool): Whether to immediately download the response
                           content. Defaults to ``False``.
            verify (bool): Whether the SSL cert will be verified.
                           A CA_BUNDLE path can also be provided. Defaults to ``True``.
            cert (str|tuple): If String, path to ssl client cert file (.pem).
                              If Tuple, ('cert', 'key') pair.
            hooks (dict): Event hooks.

        Returns:
            requests.Response: HTTP response.
        """
        if not timeout:
            timeout = TIMEOUT
        if callable(url):
            url = url()
        return super(Session, self).request(method, url, params, data, headers,
                                            cookies, files, auth, timeout,
                                            allow_redirects, proxies, hooks, stream,
                                            verify, cert, json)
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.
            params (bytes|dict): Dictionary or bytes to be sent in the query
                                 string for the request.
            data (bytes|dict|file): Dictionary, bytes, or file-like object to send
                                    in the body of the request.
            json (dict|list): JSON to send in the body of the request.
            headers (dict): Dictionary of HTTP Headers to send with the request.
            cookies (dict|CookieJar): Dict or CookieJar object to send with the request.
            files (dict): Dictionary of ``'filename': file-like-objects``
                          for multipart encoding upload.
            auth (tuple|callable): Auth tuple or callable to enable
                                   Basic/Digest/Custom HTTP Auth.
            timeout (float|tuple): How long to wait for the server to send
                                   data before giving up, as a float, or a (float, float) tuple.
            allow_redirects (bool):  Set to True by default.
            proxies (dict): Dictionary mapping protocol or protocol and
                            hostname to the URL of the proxy.
            stream (bool): Whether to immediately download the response
                           content. Defaults to ``False``.
            verify (bool): Whether the SSL cert will be verified.
                           A CA_BUNDLE path can also be provided. Defaults to ``True``.
            cert (str|tuple): If String, path to ssl client cert file (.pem).
                              If Tuple, ('cert', 'key') pair.
            hooks (dict): Event hooks.

        Returns:
            requests.Response: HTTP response.
        
Constructs and sends an HTTP request.
Constructs and sends an HTTP request .
def request(self, method, url, params=None, data=None, headers=None,
                cookies=None, files=None, auth=None, timeout=None,
                allow_redirects=True, proxies=None, hooks=None, stream=None,
                verify=None, cert=None, json=None):
        if not timeout:
            timeout = TIMEOUT
        if callable(url):
            url = url()
        return super(Session, self).request(method, url, params, data, headers,
                                            cookies, files, auth, timeout,
                                            allow_redirects, proxies, hooks, stream,
                                            verify, cert, json)
def request ( self , method , url , params = None , data = None , headers = None , cookies = None , files = None , auth = None , timeout = None , allow_redirects = True , proxies = None , hooks = None , stream = None , verify = None , cert = None , json = None ) : if not timeout : timeout = TIMEOUT if callable ( url ) : url = url ( ) return super ( Session , self ) . request ( method , url , params , data , headers , cookies , files , auth , timeout , allow_redirects , proxies , hooks , stream , verify , cert , json )
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.
            params (bytes|dict): Dictionary or bytes to be sent in the query
                                 string for the request.
            data (bytes|dict|file): Dictionary, bytes, or file-like object to send
                                    in the body of the request.
            json (dict|list): JSON to send in the body of the request.
            headers (dict): Dictionary of HTTP Headers to send with the request.
            cookies (dict|CookieJar): Dict or CookieJar object to send with the request.
            files (dict): Dictionary of ``'filename': file-like-objects``
                          for multipart encoding upload.
            auth (tuple|callable): Auth tuple or callable to enable
                                   Basic/Digest/Custom HTTP Auth.
            timeout (float|tuple): How long to wait for the server to send
                                   data before giving up, as a float, or a (float, float) tuple.
            allow_redirects (bool):  Set to True by default.
            proxies (dict): Dictionary mapping protocol or protocol and
                            hostname to the URL of the proxy.
            stream (bool): Whether to immediately download the response
                           content. Defaults to ``False``.
            verify (bool): Whether the SSL cert will be verified.
                           A CA_BUNDLE path can also be provided. Defaults to ``True``.
            cert (str|tuple): If String, path to ssl client cert file (.pem).
                              If Tuple, ('cert', 'key') pair.
            hooks (dict): Event hooks.

        Returns:
            requests.Response: HTTP response.
        """
None
requests.Response
self
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 .
params
Dictionary or bytes to be sent in the query
string for the request.
Dictionary or bytes to be sent in the query string for the request .
data
Dictionary, bytes, or file-like object to send
in the body of the request.
Dictionary bytes or file - like object to send in the body of the request .
headers
Dictionary of HTTP Headers to send with the request.
Dictionary of HTTP Headers to send with the request .
cookies
Dict or CookieJar object to send with the request.
Dict or CookieJar object to send with the request .
files
Dictionary of ``'filename': file-like-objects``
for multipart encoding upload.
Dictionary of ` ` ' filename ' : file - like - objects ` ` for multipart encoding upload .
auth
Auth tuple or callable to enable
Basic/Digest/Custom HTTP Auth.
Auth tuple or callable to enable Basic / Digest / Custom HTTP Auth .
timeout
None
allow_redirects
Set to True by default.
Set to True by default .
proxies
Dictionary mapping protocol or protocol and
hostname to the URL of the proxy.
Dictionary mapping protocol or protocol and hostname to the URL of the proxy .
hooks
None
stream
Whether to immediately download the response
content. Defaults to ``False``.
Whether to immediately download the response content . Defaults to ` ` False ` ` .
verify
Whether the SSL cert will be verified.
A CA_BUNDLE path can also be provided. Defaults to ``True``.
Whether the SSL cert will be verified . A CA_BUNDLE path can also be provided . Defaults to ` ` True ` ` .
cert
If String, path to ssl client cert file (.pem).
If Tuple, ('cert', 'key') pair.
If String path to ssl client cert file ( . pem ) . If Tuple ( ' cert ' ' key ' ) pair .
json
JSON to send in the body of the request.
JSON to send in the body of the request .