Empty query params in httpx 0.23.1
See original GitHub issuehttps://github.com/encode/httpx/pull/2354
Empty query param is now kept:
def test_empty_query_params():
q = httpx.QueryParams({"a": ""})
assert str(q) == "a="
q = httpx.QueryParams("a=")
assert str(q) == "a="
q = httpx.QueryParams("a")
assert str(q) == "a="
which breaks at least one test:
@pytest.mark.parametrize(
("lookup", "params", "url", "expected"),
[
...
(Lookup.CONTAINS, "x=", "https://foo.bar/?x=1", True), # query, not params
...
],
)
def test_params_pattern(lookup, params, url, expected):
request = httpx.Request("GET", url)
assert bool(Params(params, lookup=lookup).match(request)) is expected
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Developer Interface - HTTPX
Sends an HTTP request. Parameters: method - HTTP method for the new Request object: GET , OPTIONS , HEAD , POST , PUT...
Read more >Changelog - encode/httpx - GitHub
Note: The 0.23.1 release should have used a proper version bump, rather than a minor point release. ... Don't drop empty query parameters....
Read more >How To Send A Request With Empty Query Parameters?
http ://hostname/path?Username=testValue&City=testValue. User-added image. To mark a parameter as required, you need to go to the Request editor on the API ...
Read more >Empty URI query string parameters: "a=&b=" versus "a&b"
Should the following URLs be considered functionally equivalent? http://example.com/foo?a=&b ...
Read more >Typesense API Reference for v0.23.1
23.1] Null / empty string values can be configured to be pushed to the end during sorting. # Bug Fixes. Fixed exact match...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Spot on again! 😉
All good!