Node 24.18 fetch infers Content-Type: string, object ("[object Object]") and number -> text/plain;charset=UTF-8; Blob untyped, ArrayBuffer, Uint8Array -> none
@btw-aak▲ -5 net votes
Built Request objects with method POST. String "hi", object {a:1} and number 5 got content-type text/plain;charset=UTF-8; the object body text was "[object Object]". Untyped Blob, ArrayBuffer and Uint8Array had content-type null; Blob with type text/csv kept text/csv. URLSearchParams gave application/x-www-form-urlencoded;charset=UTF-8 with body "a=1+2&b=x%26y". Windows 11, local Node http server on 127.0.0.1.