o
    í6WjÛ	  ã                   @  st   d dl mZ d dlZd dlmZ ddlmZmZ ejddd�Z	ejd	d
d�Z
d
dgZG dd„ dƒZG dd
„ d
ƒZdS )é    )ÚannotationsN)ÚTracebackTypeé   )ÚRequestÚResponseÚTÚBaseTransport)ÚboundÚAÚAsyncBaseTransportc                   @  ó<   e Zd Zddd„Z			dddd„Zddd„Zddd„ZdS )r   Úselfr   Úreturnc                 C  s   | S ©N© ©r   r   r   úe/home/esfera/Documents/content_generation/venv/lib/python3.10/site-packages/httpx/_transports/base.pyÚ	__enter__   ó   zBaseTransport.__enter__NÚexc_typeútype[BaseException] | NoneÚ	exc_valueúBaseException | NoneÚ	tracebackúTracebackType | NoneÚNonec                 C  s   |   ¡  d S r   )Úclose©r   r   r   r   r   r   r   Ú__exit__   s   zBaseTransport.__exit__Úrequestr   r   c                 C  s   t dƒ‚)aT  
        Send a single HTTP request and return a response.

        Developers shouldn't typically ever need to call into this API directly,
        since the Client class provides all the higher level user-facing API
        niceties.

        In order to properly release any network resources, the response
        stream should *either* be consumed immediately, with a call to
        `response.stream.read()`, or else the `handle_request` call should
        be followed with a try/finally block to ensuring the stream is
        always closed.

        Example usage:

            with httpx.HTTPTransport() as transport:
                req = httpx.Request(
                    method=b"GET",
                    url=(b"https", b"www.example.com", 443, b"/"),
                    headers=[(b"Host", b"www.example.com")],
                )
                resp = transport.handle_request(req)
                body = resp.stream.read()
                print(resp.status_code, resp.headers, body)


        Takes a `Request` instance as the only argument.

        Returns a `Response` instance.
        z0The 'handle_request' method must be implemented.©ÚNotImplementedError©r   r   r   r   r   Úhandle_request   s   ÿzBaseTransport.handle_requestc                 C  s   d S r   r   r   r   r   r   r   =   r   zBaseTransport.close)r   r   r   r   ©NNN©r   r   r   r   r   r   r   r   ©r   r   r   r   ©r   r   )Ú__name__Ú
__module__Ú__qualname__r   r   r#   r   r   r   r   r   r      s    
ü
#c                   @  r   )r   r   r
   r   c                 Ã  s   �| S r   r   r   r   r   r   Ú
__aenter__B   ó   €zAsyncBaseTransport.__aenter__Nr   r   r   r   r   r   r   c                 Ã  s   �|   ¡ I d H  d S r   )Úacloser   r   r   r   Ú	__aexit__E   s   €zAsyncBaseTransport.__aexit__r   r   r   c                 Ã  s
   �t dƒ‚)Nz6The 'handle_async_request' method must be implemented.r    r"   r   r   r   Úhandle_async_requestM   s   €ÿz'AsyncBaseTransport.handle_async_requestc                 Ã  s   �d S r   r   r   r   r   r   r-   U   r,   zAsyncBaseTransport.aclose)r   r
   r   r
   r$   r%   r&   r'   )r(   r)   r*   r+   r.   r/   r-   r   r   r   r   r   A   s    
ü
)Ú
__future__r   ÚtypingÚtypesr   Ú_modelsr   r   ÚTypeVarr   r
   Ú__all__r   r   r   r   r   r   Ú<module>   s    3