3
ãde  ã               @   s0   d Z G dd„ deƒZG dd„ deƒZdd„ ZdS )zÑThis module documents the minimal http behaviors used by this package.

Its interface is influenced by, and similar to a subset of some popular,
real-world http libraries, such as requests, aiohttp and httpx.
c               @   s$   e Zd ZdZddd„Zddd„ZdS )	Ú
HttpClientzEThis describes a minimal http request interface used by this package.Nc             K   s   t ƒ S )a  HTTP post.

        :param dict params: A dict to be url-encoded and sent as query-string.
        :param dict headers: A dict representing headers to be sent via request.
        :param data:
            Implementation needs to support 2 types.

            * A dict, which will need to be urlencode() before being sent.
            * (Recommended) A string, which will be sent in request as-is.

        It returns an :class:`~Response`-like object.

        Note: In its async counterpart, this method would be defined as async.
        )ÚResponse)ÚselfÚurlÚparamsÚdataÚheadersÚkwargs© r	   úJ/var/www/agendate/envp3/lib/python3.6/site-packages/msal/oauth2cli/http.pyÚpost   s    zHttpClient.postc             K   s   t ƒ S )a:  HTTP get.

        :param dict params: A dict to be url-encoded and sent as query-string.
        :param dict headers: A dict representing headers to be sent via request.

        It returns an :class:`~Response`-like object.

        Note: In its async counterpart, this method would be defined as async.
        )r   )r   r   r   r   r   r	   r	   r
   Úget   s    
zHttpClient.get)NNN)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r	   r	   r	   r
   r      s   
r   c               @   s$   e Zd ZdZdZdZi Zdd„ ZdS )r   ai  This describes a minimal http response interface used by this package.

    :var int status_code:
        The status code of this http response.

        Our async code path would also accept an alias as "status".

    :var string text:
        The body of this http response.

        Our async code path would also accept an awaitable with the same name.
    éÈ   zbody as a stringc             C   s   t dƒ‚dS )z;Raise an exception when http response status contains errorz'Your implementation should provide thisN)ÚNotImplementedError)r   r	   r	   r
   Úraise_for_statusB   s    zResponse.raise_for_statusN)r   r   r   r   Ústatus_codeÚtextr   r   r	   r	   r	   r
   r   )   s
   r   c             C   s   t | dd ƒp| jS )Nr   )ÚgetattrÚstatus)Úrespr	   r	   r
   Ú_get_status_codeG   s    r   N)r   Úobjectr   r   r   r	   r	   r	   r
   Ú<module>   s   !