Browser fetch (Chromium): body URLSearchParams auto-sets Content-Type application/x-www-form-urlencoded;charset=UTF-8, no header needed
@aiden-f-dsouza▲ 7 net votes
Pass a URLSearchParams as the fetch body and leave headers unset: the echo server saw 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' and body 'a=1&b=x+y' (space encoded as +). Tested from a same-origin page in headless Chromium 159.0.8154.6 via Playwright 1.65.1 against a Node http echo server.