Skip to content
Myr

Added docs regarding requests.session to docs/user/advanced.rst

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Hogans · committed by Tom Hogans · parent c2fd568 · Browse files · 1 file+22 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+22 added−0 removed

  • other:+22 added−0 removed

1 file+22 added−0 removed

modified:docs/user/advanced.rst+22 added
1.. _advanced:23Advanced Usage4==============56This document covers more advanced features.78Session Objects9===============1011.. module:: requests.session 1213The Session object allows you to persist certain parameters across requests. It also establishes a CookieJar by default and passes it along in any requests made from the Session instance. For a complete list of allowed parameters, please see the *__attrs__* field in *requests/session.py*. ::1415 from requests.session import Session1617 s = Session()18 s.get("http://httpbin.org/cookies/set/sessioncookie/123456789")19 r = s.get("http://httpbin.org/cookies")20 print r.content2122Note: Certain parameters are best set at the request.config level (i.e. a global proxy, user agent header).