Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
api.cpython-313.pyc115 linesDownload Raw Back to __pycache__
1�

2��j����SrSSKJr SSKJr SSKJr SSKJr \(aSSK	J3r4 SSKJr SS	jr
SSSjjrSSjrSS
jrSSSjjrSSSjjrSSSjjrSSjrg5)z�6requests.api7~~~~~~~~~~~~8 9This module implements the Requests API.10 11:copyright: (c) 2012 by Kenneth Reitz.12:license: Apache2, see LICENSE for more details.13�)�annotations)�
TYPE_CHECKING�)�sessions)�Response)�Unpack)�_typesc��[R"5nUR"SXS.UD6sSSS5 $!,(df   g=f)al	Constructs and sends a :class:`Request <Request>`.14 15:param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.16:param url: URL for the new :class:`Request` object.17:param params: (optional) Dictionary, list of tuples or bytes to send18    in the query string for the :class:`Request`.19:param data: (optional) Dictionary, list of tuples, bytes, or file-like20    object to send in the body of the :class:`Request`.21:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.22:param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.23:param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.24:param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.25    ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``26    or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string27    defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers28    to add for the file.29:param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.30:param timeout: (optional) How many seconds to wait for the server to send data31    before giving up, as a float, or a :ref:`(connect timeout, read32    timeout) <timeouts>` tuple.33:type timeout: float or tuple34:param allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.35:type allow_redirects: bool36:param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.37:param verify: (optional) Either a boolean, in which case it controls whether we verify38        the server's TLS certificate, or a string, in which case it must be a path39        to a CA bundle to use. Defaults to ``True``.40:param stream: (optional) if ``False``, the response content will be immediately downloaded.41:param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.42:return: :class:`Response <Response>` object43:rtype: requests.Response44 45Usage::46 47  >>> import requests48  >>> req = requests.request('GET', 'https://httpbin.org/get')49  >>> req50  <Response [200]>51)�method�urlN�)r�Session�request)rr�kwargs�sessions    �RD:\code\apps\devtools\python\user_packages\Python313\site-packages\requests/api.pyrrs3��\52�	�	�	�w����@�f�@��@�53�	�	�s	�4�54ANc� �[SU4SU0UD6$)aHSends a GET request.55 56:param url: URL for the new :class:`Request` object.57:param params: (optional) Dictionary, list of tuples or bytes to send58    in the query string for the :class:`Request`.59:param \*\*kwargs: Optional arguments that ``request`` takes.60:return: :class:`Response <Response>` object61:rtype: requests.Response62�get�params�r)rrrs   rrrJs���5�#�7�f�7��7�7�c��[SU40UD6$)z�Sends an OPTIONS request.63 64:param url: URL for the new :class:`Request` object.65:param \*\*kwargs: Optional arguments that ``request`` takes.66:return: :class:`Response <Response>` object67:rtype: requests.Response68�optionsr�rrs  rrrZs���9�c�,�V�,�,rc�@�URSS5 [SU40UD6$)aOSends a HEAD request.69 70:param url: URL for the new :class:`Request` object.71:param \*\*kwargs: Optional arguments that ``request`` takes. If72    `allow_redirects` is not provided, it will be set to `False` (as73    opposed to the default :meth:`request` behavior).74:return: :class:`Response <Response>` object75:rtype: requests.Response76�allow_redirectsF�head)�77setdefaultrrs  rrrfs'�����'��/��6�3�)�&�)�)rc� �[SU4XS.UD6$)a�Sends a POST request.78 79:param url: URL for the new :class:`Request` object.80:param data: (optional) Dictionary, list of tuples, bytes, or file-like81    object to send in the body of the :class:`Request`.82:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.83:param \*\*kwargs: Optional arguments that ``request`` takes.84:return: :class:`Response <Response>` object85:rtype: requests.Response86�post)�data�jsonr)rr!r"rs    rr r us��"�6�3�?�T�?��?�?rc� �[SU4SU0UD6$)a�Sends a PUT request.87 88:param url: URL for the new :class:`Request` object.89:param data: (optional) Dictionary, list of tuples, bytes, or file-like90    object to send in the body of the :class:`Request`.91:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.92:param \*\*kwargs: Optional arguments that ``request`` takes.93:return: :class:`Response <Response>` object94:rtype: requests.Response95�putr!r�rr!rs   rr$r$�s���5�#�3�D�3�F�3�3rc� �[SU4SU0UD6$)a�Sends a PATCH request.96 97:param url: URL for the new :class:`Request` object.98:param data: (optional) Dictionary, list of tuples, bytes, or file-like99    object to send in the body of the :class:`Request`.100:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.101:param \*\*kwargs: Optional arguments that ``request`` takes.102:return: :class:`Response <Response>` object103:rtype: requests.Response104�patchr!rr%s   rr'r'�s���7�C�5�d�5�f�5�5rc��[SU40UD6$)z�Sends a DELETE request.105 106:param url: URL for the new :class:`Request` object.107:param \*\*kwargs: Optional arguments that ``request`` takes.108:return: :class:`Response <Response>` object109:rtype: requests.Response110�deleterrs  rr)r)�s���8�S�+�F�+�+r)r�strr�111_t.UriTyper�Unpack[_t.RequestKwargs]�returnr)N)rr+rz
_t.ParamsTyperzUnpack[_t.GetKwargs]r-r)rr+rr,r-r)NN)112rr+r!�_t.DataTyper"z_t.JsonTyperzUnpack[_t.PostKwargs]r-r)rr+r!r.rzUnpack[_t.DataKwargs]r-r)�__doc__�113__future__r�typingr�r�modelsr�typing_extensionsrr	�_trrrrr r$r'r)r
rr�<module>r6s���#� ����(��/A��/A� �/A�,D�/A�
�/A�f.2�
8�	�
8�*�
8�=Q�
8�
�
8� 	-�*�"��@�	�@�114�@��@�$�	@�115�@�**.�4�	�4�&�4�9N�4�
�4�$*.�6�	�6�&�6�9N�6�
�6�"	,r
codekingpro/portable-devtools · Team Ai