mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #3388 from nateprewitt/header_doc_update
updating documentation to reflect decision of #3386
This commit is contained in:
+5
-1
@@ -258,6 +258,10 @@ Behavioural Changes
|
||||
|
||||
* Keys in the ``headers`` dictionary are now native strings on all Python
|
||||
versions, i.e. bytestrings on Python 2 and unicode on Python 3. If the
|
||||
keys are not native strings (unicode on Python2 or bytestrings on Python 3)
|
||||
keys are not native strings (unicode on Python 2 or bytestrings on Python 3)
|
||||
they will be converted to the native string type assuming UTF-8 encoding.
|
||||
|
||||
* Values in the ``headers`` dictionary should always be strings. This has
|
||||
been the project's position since before 1.0 but a recent change
|
||||
(since version 2.11.0) enforces this more strictly. It's advised to avoid
|
||||
passing header values as unicode when possible.
|
||||
|
||||
@@ -211,6 +211,7 @@ Note: Custom headers are given less precedence than more specific sources of inf
|
||||
|
||||
Furthermore, 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.
|
||||
|
||||
Note: All header values must be a ``string``, bytestring, or unicode. While permitted, it's advised to avoid passing unicode header values.
|
||||
|
||||
More complicated POST requests
|
||||
------------------------------
|
||||
|
||||
Reference in New Issue
Block a user