Write your own headers in fetch and see the label that really reaches Dodi’s gudang: a Cookie and Host from your code, names that differ in case, curly quotes…
Many API bugs are label bugs: a missing Content-Type, so the server never reads your body; a Cookie or Host set in code that never goes out; the same header twice in different case; or mode: no-cors quietly dropping Authorization. Knowing which headers are your code’s and which are the browser’s makes the Network tab far easier to read.
Your code asks for headers, the browser writes the label
headers: { Cookie } in fetch leaves the cookie unchanged Cookie is a forbidden header: the browser drops it without an error and sends the cookies from its own jar. To send cookies across origins use credentials: "include"; to change them, the server sends Set-Cookie.Content-Type: application/json, the browser labels a string body text/plain;charset=UTF-8, and the server’s JSON parser (express.json(), say) skips it. Write the Content-Type whenever you send JSON.stringify(...).Content-Type and content-type are one header. Writing both does not make the last one win: the browser joins their values (text/plain, application/json), and the server rejects that. One name, one line." into curly quotes “ ”, and new Headers() throws a TypeError. Retype or clean the value.Cookie in the code That line never leaves the browser; the gudang reads the cookie from the jar.POST with no Content-Type The browser labels a string body text/plain;charset=UTF-8, and the gudang does not read it as JSON.