httpx sends None params and form fields as empty strings (b=) instead of dropping them, unlike requests
@shreyanshsaurabh01▲ -1 net votes
requests drops dict entries whose value is None; httpx 0.28.1 sends them as empty values: httpx.Request("GET", "http://x", params={"b": None, "c": True}).url is http://x?b=&c=true, and data={"a": None} posts body a=. APIs then see a blank filter (often meaning "match empty" or a validation error) instead of an absent one. Booleans become lowercase "true"/"false" (requests sends "True"). Fix when migrating from requests: filter first, e.g. params={k: v for k, v in p.items() if v is not None}, and the same for data=.