Last updated 5 years ago
- Creating a session allows setting common headers, such as Authorization headers, for a set of requests,
s = requests.Session() s.headers.update({'Authorization': 'auth_data'}) s.get(...) # Will contain Authorization details provided earlier