
     j3                    6   S SK Jr  S SKrS SKJr  SSKJr  SSKJr  SSK	J
r
  SSKJrJrJrJrJrJrJrJrJrJrJrJr  SS	KJr  / S
QrSSSSSSSSSS\SSSSS.                                   SS jjr\SSSSSSSSSS\SSSSS.                                   SS jj5       rSSSSSSSSS\SS.                         SS jjrSSSSSSSSS\SS.                         SS jjrSSSSSSSSS\SS.                         SS jjrSSSSSSSSSSSSS\SS.                                 SS jjr SSSSSSSSSSSSS\SS.                                 SS jjr!SSSSSSSSSSSSS\SS.                                 SS jjr"SSSSSSSSS\SS.                         SS jjr#g)    )annotationsN)contextmanager   )Client)DEFAULT_TIMEOUT_CONFIG)Response)	AuthTypes	CertTypesCookieTypesHeaderTypesProxiesTypes
ProxyTypesQueryParamTypesRequestContentRequestDataRequestFilesTimeoutTypesVerifyTypes)URL)	deletegetheadoptionspatchpostputrequeststreamFT)paramscontentdatafilesjsonheaderscookiesauthproxyproxiestimeoutfollow_redirectsverifycert	trust_envc                   [        UU
UUUUUS9 nUR                  U UUUUUUUU	US9
sSSS5        $ ! , (       d  f       g= f)a  
Sends an HTTP request.

**Parameters:**

* **method** - HTTP method for the new `Request` object: `GET`, `OPTIONS`,
`HEAD`, `POST`, `PUT`, `PATCH`, or `DELETE`.
* **url** - URL for the new `Request` object.
* **params** - *(optional)* Query parameters to include in the URL, as a
string, dictionary, or sequence of two-tuples.
* **content** - *(optional)* Binary content to include in the body of the
request, as bytes or a byte iterator.
* **data** - *(optional)* Form data to include in the body of the request,
as a dictionary.
* **files** - *(optional)* A dictionary of upload files to include in the
body of the request.
* **json** - *(optional)* A JSON serializable object to include in the body
of the request.
* **headers** - *(optional)* Dictionary of HTTP headers to include in the
request.
* **cookies** - *(optional)* Dictionary of Cookie items to include in the
request.
* **auth** - *(optional)* An authentication class to use when sending the
request.
* **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
* **proxies** - *(optional)* A dictionary mapping proxy keys to proxy URLs.
* **timeout** - *(optional)* The timeout configuration to use when sending
the request.
* **follow_redirects** - *(optional)* Enables or disables HTTP redirects.
* **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
verify the identity of requested hosts. Either `True` (default CA bundle),
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
(which will disable verification).
* **cert** - *(optional)* An SSL certificate used by the requested host
to authenticate the client. Either a path to an SSL certificate file, or
two-tuple of (certificate file, key file), or a three-tuple of (certificate
file, key file, password).
* **trust_env** - *(optional)* Enables or disables usage of environment
variables for configuration.

**Returns:** `Response`

Usage:

```
>>> import httpx
>>> response = httpx.request('GET', 'https://httpbin.org/get')
>>> response
<Response [200 OK]>
```
r%   r'   r(   r,   r+   r)   r-   
methodurlr    r!   r"   r#   r   r$   r&   r*   N)r   r   )r1   r2   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   clients                     T/home/ubuntu/second-brain/public-api/venv/lib/python3.13/site-packages/httpx/_api.pyr   r   &   sf    N 

 
~~-  

 
 
s	   2
A c             #     #    [        UU
UUUUUS9 nUR                  U UUUUUUUU	US9
 nUv   SSS5        SSS5        g! , (       d  f       N= f! , (       d  f       g= f7f)z
Alternative to `httpx.request()` that streams the response body
instead of loading it into memory at once.

**Parameters**: See `httpx.request`.

See also: [Streaming Responses][0]

[0]: /quickstart#streaming-responses
r/   r0   N)r   r   )r1   r2   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r3   responses                      r4   r   r      s     > 

 
]]-  
 N

 

 

 
s1   A#AAA	A#
A	A
A A#r   r$   r%   r&   r'   r(   r*   r,   r+   r)   r-   c               ,    [        SU UUUUUUUUU	U
US9$ )z
Sends a `GET` request.

**Parameters**: See `httpx.request`.

Note that the `data`, `files`, `json` and `content` parameters are not available
on this function, as `GET` requests should not include a request body.
GETr7   r   r2   r   r$   r%   r&   r'   r(   r*   r,   r+   r)   r-   s               r4   r   r      s8    . )     c               ,    [        SU UUUUUUUUU	U
US9$ )z
Sends an `OPTIONS` request.

**Parameters**: See `httpx.request`.

Note that the `data`, `files`, `json` and `content` parameters are not available
on this function, as `OPTIONS` requests should not include a request body.
OPTIONSr7   r:   r;   s               r4   r   r      s8    . ) r<   c               ,    [        SU UUUUUUUUU	U
US9$ )z
Sends a `HEAD` request.

**Parameters**: See `httpx.request`.

Note that the `data`, `files`, `json` and `content` parameters are not available
on this function, as `HEAD` requests should not include a request body.
HEADr7   r:   r;   s               r4   r   r     s8    . ) r<   r    r!   r"   r#   r   r$   r%   r&   r'   r(   r*   r,   r+   r)   r-   c               8    [        SU 4UUUUUUUUU	U
UUUUUS.6$ )z?
Sends a `POST` request.

**Parameters**: See `httpx.request`.
POSTrA   r:   r2   r    r!   r"   r#   r   r$   r%   r&   r'   r(   r*   r,   r+   r)   r-   s                   r4   r   r   3  sK    0  )# r<   c               8    [        SU 4UUUUUUUUU	U
UUUUUS.6$ )z>
Sends a `PUT` request.

**Parameters**: See `httpx.request`.
PUTrA   r:   rD   s                   r4   r   r   `  sK    0  )# r<   c               8    [        SU 4UUUUUUUUU	U
UUUUUS.6$ )z@
Sends a `PATCH` request.

**Parameters**: See `httpx.request`.
PATCHrA   r:   rD   s                   r4   r   r     sK    0  )# r<   c               ,    [        SU UUUUUUUUU	U
US9$ )z
Sends a `DELETE` request.

**Parameters**: See `httpx.request`.

Note that the `data`, `files`, `json` and `content` parameters are not available
on this function, as `DELETE` requests should not include a request body.
DELETEr7   r:   r;   s               r4   r   r     s8    . ) r<   )$r1   strr2   	URL | strr   QueryParamTypes | Noner    RequestContent | Noner!   RequestData | Noner"   RequestFiles | Noner#   typing.Any | Noner$   HeaderTypes | Noner%   CookieTypes | Noner&   AuthTypes | Noner'   ProxyTypes | Noner(   ProxiesTypes | Noner)   r   r*   boolr+   r   r,   CertTypes | Noner-   rW   returnr   )$r1   rK   r2   rL   r   rM   r    rN   r!   rO   r"   rP   r#   rQ   r$   rR   r%   rS   r&   rT   r'   rU   r(   rV   r)   r   r*   rW   r+   r   r,   rX   r-   rW   rY   ztyping.Iterator[Response])r2   rL   r   rM   r$   rR   r%   rS   r&   rT   r'   rU   r(   rV   r*   rW   r,   rX   r+   r   r)   r   r-   rW   rY   r   )"r2   rL   r    rN   r!   rO   r"   rP   r#   rQ   r   rM   r$   rR   r%   rS   r&   rT   r'   rU   r(   rV   r*   rW   r,   rX   r+   r   r)   r   r-   rW   rY   r   )$
__future__r   typing
contextlibr   _clientr   _configr   _modelsr   _typesr	   r
   r   r   r   r   r   r   r   r   r   r   _urlsr   __all__r   r   r   r   r   r   r   r   r    r<   r4   <module>rd      s]   "  %  +     
" &*%)#!%""&"&!##'2"!%[
[
	[
 #	[

 #[
 [
 [
 [
  [
  [
 [
 [
 ![
 [
 [
  ![
" #[
$ %[
& '[
| 
 &*%)#!%""&"&!##'2"!%33	3 #	3
 #3 3 3 3  3  3 3 3 !3 3 3  !3" #3$ %3& '3 3r &*"&"&!##'"!2%	% #%  	%
  % % % !% % % % % % %V &*"&"&!##'"!2%	% #%  	%
  % % % !% % % % % % %V &*"&"&!##'"!2%	% #%  	%
  % % % !% % % % % % %V &*#!%"%)"&"&!##'"!2#*	* #* 	*
 * * #*  *  * * * !* * * *  !*" #*$ %*` &*#!%"%)"&"&!##'"!2#*	* #* 	*
 * * #*  *  * * * !* * * *  !*" #*$ %*` &*#!%"%)"&"&!##'"!2#*	* #* 	*
 * * #*  *  * * * !* * * *  !*" #*$ %*` &*"&"&!##'"!2%	% #%  	%
  % % % !% % % % % % %r<   