Skip to content

Commit cb7fcd7

Browse files
authored
Specify that Session.headers needs to be set to a OrderedDict in Header Ordering docs (#6475)
1 parent aa4cc78 commit cb7fcd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/user/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ Header Ordering
10811081

10821082
In unusual circumstances you may want to provide headers in an ordered manner. If you pass an ``OrderedDict`` to the ``headers`` keyword argument, that will provide the headers with an ordering. *However*, the ordering of the default headers used by Requests will be preferred, which means that if you override default headers in the ``headers`` keyword argument, they may appear out of order compared to other headers in that keyword argument.
10831083

1084-
If this is problematic, users should consider setting the default headers on a :class:`Session <requests.Session>` object, by setting :attr:`Session <requests.Session.headers>` to a custom ``OrderedDict``. That ordering will always be preferred.
1084+
If this is problematic, users should consider setting the default headers on a :class:`Session <requests.Session>` object, by setting :attr:`Session.headers <requests.Session.headers>` to a custom ``OrderedDict``. That ordering will always be preferred.
10851085

10861086
.. _timeouts:
10871087

0 commit comments

Comments
 (0)