ó
vâSc @ sE d d l m Z d d l m Z d Z d d d d d d d „ Z d S( iÿÿÿÿ( t b64encodei ( t bs gzip,deflatec C sç i } | rR t | t ƒ r n' t | t ƒ r? d j | ƒ } n t } | | d <n | re | | d <n | rx d | d <n | r¤ d t t | ƒ ƒ j d ƒ | d <n | rÐ d t t | ƒ ƒ j d ƒ | d <n | rã d
| d <n | S( s
Shortcuts for generating request headers.
:param keep_alive:
If ``True``, adds 'connection: keep-alive' header.
:param accept_encoding:
Can be a boolean, list, or string.
``True`` translates to 'gzip,deflate'.
List will get joined by comma.
String will be used as provided.
:param user_agent:
String representing the user-agent you want, such as
"python-urllib3/0.6"
:param basic_auth:
Colon-separated username:password string for 'authorization: basic ...'
auth header.
:param proxy_basic_auth:
Colon-separated username:password string for 'proxy-authorization: basic ...'
auth header.
:param disable_cache:
If ``True``, adds 'cache-control: no-cache' header.
Example::
>>> make_headers(keep_alive=True, user_agent="Batman/1.0")
{'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
>>> make_headers(accept_encoding=True)
{'accept-encoding': 'gzip,deflate'}
t ,s accept-encodings
user-agents
keep-alivet
connections Basic s utf-8t
authorizations proxy-authorizations no-caches
cache-control( t
isinstancet strt listt joint ACCEPT_ENCODINGR R t decode( t
keep_alivet accept_encodingt
user_agentt
basic_autht proxy_basic_autht
disable_cachet headers( ( s8 /usr/lib/python2.7/site-packages/urllib3/util/request.pyt make_headers s* $
##
N( t base64R t packages.sixR R t NoneR ( ( ( s8 /usr/lib/python2.7/site-packages/urllib3/util/request.pyt <module> s