Configurations:
:base_headers: Default HTTP headers.
-:verbose: Stream to write request logging to.
:max_redirects: Maximum number of redirects allowed within a request.s
:keep_alive: Reuse HTTP Connections?
:max_retries: The number of times a request should be retried in the event of a connection failure.
-:strict_mode: If true, Requests will do its best to follow RFCs (e.g. POST redirects).
:pool_maxsize: The maximium size of an HTTP connection pool.
:pool_connections: The number of active HTTP connection pools to use.
:encode_uri: If true, URIs will automatically be percent-encoded.
:trust_env: If true, the surrouding environment will be trusted (environ, netrc).
-:store_cookies: If false, the received cookies as part of the HTTP response would be ignored.
-
"""
SCHEMAS = ['http', 'https']
# Set encoding.
response.encoding = get_encoding_from_headers(response.headers)
- # Add new cookies from the server. Don't if configured not to
- if self.config.get('store_cookies'):
- extract_cookies_to_jar(self.cookies, self, resp)
+ # Add new cookies from the server.
+ extract_cookies_to_jar(self.cookies, self, resp)
# Save cookies in Response.
response.cookies = self.cookies