Format: application/x-python-code
⬇ Download File (3.2 KB)
   1  o
   2  
   3  7'hJ�@srddlmZddlZddlZddlmZmZmZmZddl	m
   4  Z
   5  dddd�ddd�Zejdddd�ddd��Z
   6  dS)�)�annotationsN�)�URL�
   7  Extensions�HeaderTypes�Response)�ConnectionPool)�headers�content�
   8  extensions�method�bytes | str�url�URL | bytes | strr	rr
   9  �%bytes | typing.Iterator[bytes] | Noner�Extensions | None�returnrcCs>t��}|j|||||d�Wd�S1swYdS)aT
  10      Sends an HTTP request, returning the response.
  11  
  12      ```
  13      response = httpcore.request("GET", "https://www.example.com/")
  14      ```
  15  
  16      Arguments:
  17          method: The HTTP method for the request. Typically one of `"GET"`,
  18              `"OPTIONS"`, `"HEAD"`, `"POST"`, `"PUT"`, `"PATCH"`, or `"DELETE"`.
  19          url: The URL of the HTTP request. Either as an instance of `httpcore.URL`,
  20              or as str/bytes.
  21          headers: The HTTP request headers. Either as a dictionary of str/bytes,
  22              or as a list of two-tuples of str/bytes.
  23          content: The content of the request body. Either as bytes,
  24              or as a bytes iterator.
  25          extensions: A dictionary of optional extra information included on the request.
  26              Possible keys include `"timeout"`.
  27  
  28      Returns:
  29          An instance of `httpcore.Response`.
  30      �rrr	r
  31  rN)r�request)rrr	r
  32  r�pool�r�CC:\Users\shubh\Videos\agent\nova\Lib\site-packages\httpcore/_api.pyr
  33  s�$�r�typing.Iterator[Response]c	csx�t��.}|j|||||d��}|VWd�n1swYWd�dSWd�dS1s5wYdS)ao
  34      Sends an HTTP request, returning the response within a content manager.
  35  
  36      ```
  37      with httpcore.stream("GET", "https://www.example.com/") as response:
  38          ...
  39      ```
  40  
  41      When using the `stream()` function, the body of the response will not be
  42      automatically read. If you want to access the response body you should
  43      either use `content = response.read()`, or `for chunk in response.iter_content()`.
  44  
  45      Arguments:
  46          method: The HTTP method for the request. Typically one of `"GET"`,
  47              `"OPTIONS"`, `"HEAD"`, `"POST"`, `"PUT"`, `"PATCH"`, or `"DELETE"`.
  48          url: The URL of the HTTP request. Either as an instance of `httpcore.URL`,
  49              or as str/bytes.
  50          headers: The HTTP request headers. Either as a dictionary of str/bytes,
  51              or as a list of two-tuples of str/bytes.
  52          content: The content of the request body. Either as bytes,
  53              or as a bytes iterator.
  54          extensions: A dictionary of optional extra information included on the request.
  55              Possible keys include `"timeout"`.
  56  
  57      Returns:
  58          An instance of `httpcore.Response`.
  59      rN)r�stream)rrr	r
  60  rr�responserrrr2s�$���"�r)rr
  61  rrr	rr
  62  rrrrr)rr
  63  rrr	rr
  64  rrrrr)�
  65  __future__r�
  66  contextlib�typingZ_modelsrrrrZ_sync.connection_poolrr�contextmanagerrrrrr�<module>s�(�