Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

requests sessions

s = requests.Session()
s.auth = ('user', 'pass')
s.headers.update({'x-test': 'true'})

# both 'x-test' and 'x-test2' are sent
s.get('https://httpbin.org/headers', headers={'x-test2': 'true'})
Source by requests.readthedocs.io #
 
PREVIOUS NEXT
Tagged: #requests #sessions
ADD COMMENT
Topic
Name
8+7 =