Co-authored-by: Tom Christie <tom@tomchristie.com>
This commit is contained in:
parent
0cb7e5a2e7
commit
8ecb86f0d7
@ -28,6 +28,7 @@ Our revised [SSL documentation](docs/advanced/ssl.md) covers how to implement th
|
|||||||
* Ensure `certifi` and `httpcore` are only imported if required. (#3377)
|
* Ensure `certifi` and `httpcore` are only imported if required. (#3377)
|
||||||
* Treat `socks5h` as a valid proxy scheme. (#3178)
|
* Treat `socks5h` as a valid proxy scheme. (#3178)
|
||||||
* Cleanup `Request()` method signature in line with `client.request()` and `httpx.request()`. (#3378)
|
* Cleanup `Request()` method signature in line with `client.request()` and `httpx.request()`. (#3378)
|
||||||
|
* Bugfix: When passing `params={}`, always strictly update rather than merge with an existing querystring. (#3364)
|
||||||
|
|
||||||
## 0.27.2 (27th August, 2024)
|
## 0.27.2 (27th August, 2024)
|
||||||
|
|
||||||
|
|||||||
@ -226,3 +226,16 @@ def test_request_generator_content_picklable():
|
|||||||
request.read()
|
request.read()
|
||||||
pickle_request = pickle.loads(pickle.dumps(request))
|
pickle_request = pickle.loads(pickle.dumps(request))
|
||||||
assert pickle_request.content == b"test 123"
|
assert pickle_request.content == b"test 123"
|
||||||
|
|
||||||
|
|
||||||
|
def test_request_params():
|
||||||
|
request = httpx.Request("GET", "http://example.com", params={})
|
||||||
|
assert str(request.url) == "http://example.com"
|
||||||
|
|
||||||
|
request = httpx.Request(
|
||||||
|
"GET", "http://example.com?c=3", params={"a": "1", "b": "2"}
|
||||||
|
)
|
||||||
|
assert str(request.url) == "http://example.com?a=1&b=2"
|
||||||
|
|
||||||
|
request = httpx.Request("GET", "http://example.com?a=1", params={})
|
||||||
|
assert str(request.url) == "http://example.com"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user