o
    h                     @   st   d dl Z d dlmZ ddlmZmZmZ ddlmZm	Z	m
Z
mZmZmZmZmZmZ G dd dZG dd	 d	ZdS )
    N)TracebackType   )	CertTypesTimeoutTypesVerifyTypes)	AsyncRequestAsyncRequestDataAsyncResponseHeaderTypesQueryParamTypesRequestRequestDataResponseURLTypesc                   @      e Zd ZdZddddddddedededed	ed
e	de
dedefddZ			dded
e	de
dedef
ddZdddZdddZ			ddeje dededdfddZdS )AsyncDispatchera!  
    Base class for async dispatcher classes, that handle sending the request.

    Stubs out the interface, as well as providing a `.request()` convenience
    implementation, to make it easy to use or test stand-alone dispatchers,
    without requiring a complete `Client` instance.
        Ndataparamsheadersverifycerttimeoutmethodurlr   r   r   r   r   r   returnc          
         s,   t |||||d}	| j|	|||dI d H S N)r   r   r   )r   r   r   )r   send
selfr   r   r   r   r   r   r   r   request r"   [/var/www/html/magazine_api/magazine_env/lib/python3.10/site-packages/httpx/dispatch/base.pyr!      s   zAsyncDispatcher.requestr!   c                    s   t  NNotImplementedErrorr    r!   r   r   r   r"   r"   r#   r   *   s   zAsyncDispatcher.sendc                    s   d S r$   r"   r    r"   r"   r#   close3      zAsyncDispatcher.closec                    s   | S r$   r"   r(   r"   r"   r#   
__aenter__6   r*   zAsyncDispatcher.__aenter__exc_type	exc_value	tracebackc                    s   |   I d H  d S r$   r)   r    r,   r-   r.   r"   r"   r#   	__aexit__9   s   zAsyncDispatcher.__aexit__NNNr   N)r   r   )__name__
__module____qualname____doc__strr   r   r   r
   r   r   r   r	   r!   r   r   r)   r+   typingTypeBaseExceptionr   r1   r"   r"   r"   r#   r      n    	



	
r   c                   @   r   )
Dispatchera'  
    Base class for synchronous dispatcher classes, that handle sending the request.

    Stubs out the interface, as well as providing a `.request()` convenience
    implementation, to make it easy to use or test stand-alone dispatchers,
    without requiring a complete `Client` instance.
    r   Nr   r   r   r   r   r   r   r   r   r   c          
      C   s$   t |||||d}	| j|	|||dS r   )r   r   r   r"   r"   r#   r!   K   s   zDispatcher.requestr!   c                 C   s   t  r$   r%   r'   r"   r"   r#   r   Z   s   zDispatcher.sendc                 C   s   d S r$   r"   r(   r"   r"   r#   r)   c      zDispatcher.closec                 C   s   | S r$   r"   r(   r"   r"   r#   	__enter__f   r>   zDispatcher.__enter__r,   r-   r.   c                 C   s   |    d S r$   r/   r0   r"   r"   r#   __exit__i   s   zDispatcher.__exit__r2   r3   )r   r=   )r4   r5   r6   r7   r8   r   r   r   r
   r   r   r   r   r!   r   r   r)   r?   r9   r:   r;   r   r@   r"   r"   r"   r#   r=   B   r<   r=   )r9   typesr   configr   r   r   modelsr   r   r	   r
   r   r   r   r   r   r   r=   r"   r"   r"   r#   <module>   s    ,0