a
    !f	                     @   s`   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G d
d dZ	G dd	 d	Z
dS )    N)TracebackType   )RequestResponseTBaseTransport)boundAAsyncBaseTransportc                   @   sh   e Zd ZeedddZdejeje  eje eje	 ddddZ
eedd	d
ZddddZdS )r   selfreturnc                 C   s   | S N r   r   r   W/var/www/html/python-backend/venv/lib/python3.9/site-packages/httpx/_transports/base.py	__enter__   s    zBaseTransport.__enter__Nexc_type	exc_value	tracebackr   c                 C   s   |    d S r   )closer   r   r   r   r   r   r   __exit__   s    zBaseTransport.__exit__requestr   c                 C   s   t ddS )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.NNotImplementedErrorr   r   r   r   r   handle_request   s    zBaseTransport.handle_requestr   c                 C   s   d S r   r   r   r   r   r   r   9   s    zBaseTransport.close)NNN)__name__
__module____qualname__r   r   typingOptionalTypeBaseExceptionr   r   r   r   r   r   r   r   r   r   r   
   s      #c                   @   sh   e Zd ZeedddZdejeje  eje eje	 ddddZ
eedd	d
ZddddZdS )r
   r   c                    s   | S r   r   r   r   r   r   
__aenter__>   s    zAsyncBaseTransport.__aenter__Nr   c                    s   |   I d H  d S r   )acloser   r   r   r   	__aexit__A   s    zAsyncBaseTransport.__aexit__r   c                    s   t dd S )Nz6The 'handle_async_request' method must be implemented.r   r   r   r   r   handle_async_requestI   s    z'AsyncBaseTransport.handle_async_requestr    c                    s   d S r   r   r   r   r   r   r)   Q   s    zAsyncBaseTransport.aclose)NNN)r!   r"   r#   r	   r(   r$   r%   r&   r'   r   r*   r   r   r+   r)   r   r   r   r   r
   =   s      
)r$   typesr   Z_modelsr   r   TypeVarr   r	   r   r
   r   r   r   r   <module>   s   3