Files
Trancribe/venv/lib/python3.12/site-packages/requests/__pycache__/api.cpython-312.pyc

113 lines
7.9 KiB
Plaintext
Raw Normal View History

<EFBFBD>
$n!j<><00><01><><00>dZddlmZddlmZddlmZddlmZer ddl m
Z
ddlm Z  dd <09>Z d dd <0B>Zdd <0C>Zdd <0A>Z d dd<0E>Z d dd<0F>Z d dd<10>Zdd<11>Zy
)z<>
requests.api
~~~~~~~~~~~~
This module implements the Requests API.
:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.
<EFBFBD>)<01> annotations)<01> TYPE_CHECKING<4E>)<01>sessions)<01>Response)<01>Unpack)<01>_typesc <01><><00>tj<00>5}|jd||d<01>|<02><01>cddd<02>S#1swYyxYw)a<> Constructs and sends a :class:`Request <Request>`.
:param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary, list of tuples or bytes to send
in the query string for the :class:`Request`.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
object to send in the body of the :class:`Request`.
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
:param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
:param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
:param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string
defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
to add for the file.
:param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
:param timeout: (optional) How many seconds to wait for the server to send data
before giving up, as a float, or a :ref:`(connect timeout, read
timeout) <timeouts>` tuple.
:type timeout: float or tuple
:param allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.
:type allow_redirects: bool
:param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
:param verify: (optional) Either a boolean, in which case it controls whether we verify
the server's TLS certificate, or a string, in which case it must be a path
to a CA bundle to use. Defaults to ``True``.
:param stream: (optional) if ``False``, the response content will be immediately downloaded.
:param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
:return: :class:`Response <Response>` object
:rtype: requests.Response
Usage::
>>> import requests
>>> req = requests.request('GET', 'https://httpbin.org/get')
>>> req
<Response [200]>
)<02>method<6F>urlN<6C>)r<00>Session<6F>request)r r <00>kwargs<67>sessions <20>N/home/jean/linux-transcriber/venv/lib/python3.12/site-packages/requests/api.pyrrsD<00><00>\
<12> <19> <19> <1B>A<01>w<EFBFBD><1E>w<EFBFBD><EFBFBD><EFBFBD>@<40>f<EFBFBD>#<23>@<40><16>@<40>A<01>A<01>A<01>s<00>4<03>=Nc <01> <00>td|fd|i|<02><01>S)adSends a GET request.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary, list of tuples or bytes to send
in the query string for the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
<20>get<65>params<6D>r)r rrs rrrJs<00><00> <13>5<EFBFBD>#<23> 7<>f<EFBFBD> 7<><06> 7<>7<>c <01><00>td|fi|<01><01>S)z<>Sends an OPTIONS request.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
<20>optionsr<00>r rs rrrZs<00><00> <13>9<EFBFBD>c<EFBFBD> ,<2C>V<EFBFBD> ,<2C>,rc <01>@<00>|jdd<02>td|fi|<01><01>S)akSends a HEAD request.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes. If
`allow_redirects` is not provided, it will be set to `False` (as
opposed to the default :meth:`request` behavior).
:return: :class:`Response <Response>` object
:rtype: requests.Response
<20>allow_redirectsF<73>head)<02>
setdefaultrrs rrrfs'<00><00> <0B><15><15>'<27><15>/<2F> <12>6<EFBFBD>3<EFBFBD> )<29>&<26> )<29>)rc <01>"<00>td|f||d<02>|<03><01>S)a<>Sends a POST request.
:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
object to send in the body of the :class:`Request`.
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
<20>post)<02>data<74>jsonr)r r!r"rs rr r us<00><00>" <13>6<EFBFBD>3<EFBFBD> ?<3F>T<EFBFBD><04> ?<3F><06> ?<3F>?rc <01> <00>td|fd|i|<02><01>S)a<>Sends a PUT request.
:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
object to send in the body of the :class:`Request`.
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
<20>putr!r<00>r r!rs rr$r$<00>s<00><00> <13>5<EFBFBD>#<23> 3<>D<EFBFBD> 3<>F<EFBFBD> 3<>3rc <01> <00>td|fd|i|<02><01>S)a<>Sends a PATCH request.
:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
object to send in the body of the :class:`Request`.
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
<20>patchr!rr%s rr'r'<00>s<00><00> <13>7<EFBFBD>C<EFBFBD> 5<>d<EFBFBD> 5<>f<EFBFBD> 5<>5rc <01><00>td|fi|<01><01>S)z<>Sends a DELETE request.
:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response
<20>deleterrs rr)r)<00>s<00><00> <13>8<EFBFBD>S<EFBFBD> +<2B>F<EFBFBD> +<2B>+r)r <00>strr <00>
_t.UriTyper<00>Unpack[_t.RequestKwargs]<5D>returnr)N)r r+rz _t.ParamsTyperzUnpack[_t.GetKwargs]r-r)r r+rr,r-r)NN)
r r+r!<00> _t.DataTyper"z _t.JsonTyperzUnpack[_t.PostKwargs]r-r)r r+r!r.rzUnpack[_t.DataKwargs]r-r)<15>__doc__<5F>
__future__r<00>typingr<00>r<00>modelsr<00>typing_extensionsrr <00>_trrrrr r$r'r)r rr<00><module>r6s<00><01><04>#<23> <20><16><1C><10>(<28><1E>/A<01> <0F>/A<01> <20>/A<01>,D<>/A<01> <0A>/A<01>f.2<EFBFBD> 8<> <13> 8<>*<2A> 8<>=Q<> 8<> <0A> 8<> -<2D> *<2A>"<1D><1C>@<01> <13>@<01>
<15>@<01> <16>@<01>$<24> @<01>
<0E> @<01>**.<2E>4<> <13>4<>&<26>4<>9N<39>4<> <0A>4<>$*.<2E>6<> <13>6<>&<26>6<>9N<39>6<> <0A>6<>" ,r