Merge pull request #3388 from nateprewitt/header_doc_update

updating documentation to reflect decision of #3386
This commit is contained in:
Ian Cordasco
2016-07-07 09:56:08 -05:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -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.
+1
View File
@@ -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
------------------------------