3 �ga� � @ s^ d dl mZ G dd� d�ZG dd� de�ZG dd� de�ZG dd � d e�ZG d d� de�ZdS ) � )�Tuplec @ s e Zd ZdZdZdZdS )� BasePluginN)�__name__� __module__�__qualname__�name�descriptionZpackage_name� r r �/usr/lib/python3.6/base.pyr s r c @ s: e Zd ZdZdZdZdZdZdZdZ de e d�dd�ZdS ) � AuthPluginz� Base auth plugin class. See httpie-ntlm for an example auth plugin: <https://github.com/httpie/httpie-ntlm> See also `test_auth_plugins.py` NTF)�username�passwordc C s t � �dS )a If `auth_parse` is set to `True`, then `username` and `password` contain the parsed credentials. Use `self.raw_auth` to access the raw value passed through `--auth, -a`. Return a ``requests.auth.AuthBase`` subclass instance. N)�NotImplementedError)�selfr r r r r �get_auth: s zAuthPlugin.get_auth)NN)r r r �__doc__Z auth_typeZauth_requireZ auth_parseZnetrc_parseZprompt_passwordZraw_auth�strr r r r r r s r c @ s e Zd ZdZdZdd� ZdS )�TransportPluginz� Requests transport adapter docs: <https://requests.readthedocs.io/en/latest/user/advanced/#transport-adapters> See httpie-unixsocket for an example transport plugin: <https://github.com/httpie/httpie-unixsocket> Nc C s t � �dS )zy Return a ``requests.adapters.BaseAdapter`` subclass instance to be mounted to ``self.prefix``. N)r )r r r r �get_adapterW s zTransportPlugin.get_adapter)r r r r �prefixr r r r r r H s r c @ sJ e Zd ZdZed�dd�Zeeeef d�dd�Ze ee d�d d ��ZdS )�ConverterPluginz� Possibly converts binary response data for prettified terminal display. See httpie-msgpack for an example converter plugin: <https://github.com/rasky/httpie-msgpack>. )�mimec C s || _ d S )N)r )r r r r r �__init__j s zConverterPlugin.__init__)�body�returnc C s t �dS )z� Convert a binary body to a textual representation for the terminal and return a tuple containing the new Content-Type and content, e.g.: ('application/json', '{}') N)r )r r r r r �convertm s zConverterPlugin.convert)r r c C s t �d S )N)r )�clsr r r r �supportsw s zConverterPlugin.supportsN)r r r r r r �bytesr r �classmethod�boolr r r r r r ` s r c @ s>