|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/ |
Upload File : |
�
�2{Yc @ sk y d d l m Z Wn! e k
r7 d d l m Z n Xd d l m Z d g Z d e f d � � YZ d S( i����( t urlencodei ( t encode_multipart_formdatat RequestMethodsc B sw e Z d Z e d d d d g � Z d
d � Z d
d
e d
d � Z d
d
d � Z d
d � Z
d
d
e d
d � Z RS( s�
Convenience mixin for classes who implement a :meth:`urlopen` method, such
as :class:`~urllib3.connectionpool.HTTPConnectionPool` and
:class:`~urllib3.poolmanager.PoolManager`.
Provides behavior for making common types of HTTP request methods and
decides which type of request field encoding to use.
Specifically,
:meth:`.request_encode_url` is for sending requests whose fields are encoded
in the URL (such as GET, HEAD, DELETE).
:meth:`.request_encode_body` is for sending requests whose fields are
encoded in the *body* of the request using multipart or www-form-urlencoded
(such as for POST, PUT, PATCH).
:meth:`.request` is for making any kind of request, it will look up the
appropriate encoding format and use one of the above two methods to make
the request.
Initializer parameters:
:param headers:
Headers to include with all requests, unless other headers are given
explicitly.
t DELETEt GETt HEADt OPTIONSc C s | p i | _ d S( N( t headers( t selfR ( ( s^ /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/request.pyt __init__1 s c K s t d � � d S( NsM Classes extending RequestMethods must implement their own ``urlopen`` method.( t NotImplemented( R t methodt urlt bodyR t encode_multipartt multipart_boundaryt kw( ( s^ /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/request.pyt urlopen4 s c K s] | j � } | | j k r: | j | | d | d | | �S| j | | d | d | | �Sd S( s�
Make a request using :meth:`urlopen` with the appropriate encoding of
``fields`` based on the ``method`` used.
This is a convenience method that requires the least amount of manual
effort. It can be used in most situations, while still having the option
to drop down to more specific methods when necessary, such as
:meth:`request_encode_url`, :meth:`request_encode_body`,
or even the lowest level :meth:`urlopen`.
t fieldsR N( t uppert _encode_url_methodst request_encode_urlt request_encode_body( R R R R R t
urlopen_kw( ( s^ /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/request.pyt request: s c K s0 | r | d t | � 7} n | j | | | � S( s�
Make a request using :meth:`urlopen` with the ``fields`` encoded in
the url. This is useful for request methods like GET, HEAD, DELETE, etc.
t ?( R R ( R R R R R ( ( s^ /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/request.pyR P s c K s� | r'