Skip to content
Myr

added custom header precedence info

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

authored by benjaminran · committed by benjaminran · parent 0ad075c · Browse files · 1 file+9 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+9 added−0 removed

  • other:+9 added−0 removed

1 file+9 added−0 removed

modified:docs/user/quickstart.rst+9 added
188 unmodified lines
189 >>> headers = {'user-agent': 'my-app/0.0.1'}190191 >>> r = requests.get(url, headers=headers)192193Note: Custom headers are given less precedence than more specific sources of information. For instance:194195* Authorization headers will be overridden by any alternative auth source found.196* Authorization headers will be removed if you get redirected off-host.197* Proxy-Authorization headers will be overridden by proxy credentials provided in the URL.198* Content-Length headers will be overridden when we can determine the length of the content.199200Furthermore, Requests does not change its behavior at all based on which custom headers are specified. The headers are simply passed on into the final request.201202203More complicated POST requests204------------------------------205206Typically, you want to send some form-encoded data — much like an HTML form.
266 unmodified lines