Coding tips
JavaScript Fetch POST JSON Example (With Errors)
Send JSON with fetch(): method, Content-Type and JSON.stringify, the two mistakes that send an empty body, response.ok checks, timeouts and FormData.
Notes
Security notes, SOC lab write-ups and tested code by Mahir Faysal, a SOC Level 1 cybersecurity learner in Bangladesh, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.
Send JSON with fetch(): method, Content-Type and JSON.stringify, the two mistakes that send an empty body, response.ok checks, timeouts and FormData.
0%