-
-
Couldn't load subscription status.
- Fork 965
Labels
bugSomething isn't workingSomething isn't working
Description
Hi,
I noticed a difference between httpx and requests when processing query parameters. I provided the params for the url with query string, requests would merge params into query string, but httpx replaces the whole query string.
Here is a simple script:
import requests
import httpx
import asyncio
URL = 'https://httpbin.org/get?a=1'
r = requests.get(URL, params={'b': 2})
print('requests', r.json()['args'])
async def f():
r = await httpx.get(URL, params={'b': 2})
print('httpx', r.json()['args'])
asyncio.run(f())Results:
requests {'a': '1', 'b': '2'}
httpx {'b': '2'}
Is this an intended behavior?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working