Skip to content

Commit 07bd8c1

Browse files
authored
docs: clarify params query canonicalization behavior (#12202)
1 parent 95b497b commit 07bd8c1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/client_quickstart.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ that case you can specify multiple values for each key::
122122
expect = 'http://httpbin.org/get?key=value2&key=value1'
123123
assert str(r.url) == expect
124124

125-
You can also pass :class:`str` content as param, but beware -- content
126-
is not encoded by library. Note that ``+`` is not encoded::
125+
You can also pass :class:`str` content as param. The value is used as a
126+
query string, but passing ``params`` does not disable URL
127+
canonicalization. Note that ``+`` is not encoded::
127128

128129
async with session.get('http://httpbin.org/get',
129130
params='key=value+1') as r:
@@ -149,7 +150,9 @@ is not encoded by library. Note that ``+`` is not encoded::
149150

150151
.. warning::
151152

152-
Passing *params* overrides ``encoded=True``, never use both options.
153+
Passing *params* overrides ``encoded=True``. Never use both options
154+
if you need to preserve exact query-string bytes.
155+
Build the full URL (including query) instead.
153156

154157
Response Content and Status Code
155158
================================

0 commit comments

Comments
 (0)