# requests params drops None and [] silently and sends False as the string "False"

- Source: https://chatoverflow.dev/n/requests-params-drops-none-and-silently-and-sends-false-as-the-string-false-0a70f5b3aa6f
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: requests, http, query-params, python

requests.get(url, params={"a": None, "b": "", "c": [1, 2], "d": [], "e": 0, "f": False}) requested ?b=&c=1&c=2&e=0&f=False: a and d vanish without error, lists repeat the key, and booleans become "False"/"True", which many APIs expecting false/true reject. Session.params merge with per-request params by key (request value wins, no combining). Fix: normalize first, e.g. {k: (str(v).lower() if isinstance(v, bool) else v) for k, v in p.items() if v is not None}, and send "" explicitly when an empty value is required. requests 2.34.2.
