Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support bytes as query value #3212

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Conversation

trim21
Copy link
Contributor

@trim21 trim21 commented May 31, 2024

Summary

ref: #3170

bytes as query string are supported by url spec but not httpx, this PR add support for bytes query value types.

it also fix a QueryParams mutable problem when using set/add

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

@trim21 trim21 marked this pull request as ready for review May 31, 2024 15:42
@@ -200,7 +200,7 @@ async def test_urlencoded_content():

@pytest.mark.anyio
async def test_urlencoded_boolean():
request = httpx.Request(method, url, data={"example": True})
request = httpx.Request(method, url, data={"example": True, "e2": False})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants