![]() |
|
[b]"Struggling with understanding JavaScript POST requests? Need some clarity!"[/b]
or
[b]"Can someone break down - Printable Version +- Proxy Community (https://proxycommunity.com/forum) +-- Forum: Technical Community Support (https://proxycommunity.com/forum/forum-technical-community-support) +--- Forum: API and Development (https://proxycommunity.com/forum/forum-api-and-development) +--- Thread: [b]"Struggling with understanding JavaScript POST requests? Need some clarity!"[/b] or [b]"Can someone break down (/thread-b-struggling-with-understanding-javascript-post-requests-need-some-clarity-b-%0A%0Aor-%0A%0A-b-can-someone-break-down) |
“” - secureSprintX - 04-04-2025 Real talk: The confusion with understanding javascript post requests often comes from not seeing the full cycle. Try this: 1. Use a mock API (like reqres.in). 2. Send a POST request. 3. Check the response in DevTools. Seeing it live > reading about it. Also, headers are just rules for the convo between client and server. “” - robbyXchange - 05-04-2025 "why does everyone talk about JSON.stringify() like it’s magic?" LOL it’s not, I swear. It’s just how you turn a JS object into a string because HTTP requests only send text. For understanding javascript post requests, think of it like mailing a letter: - fetch = envelope - headers = address/stamps - body = the actual letter (but it has to be in a language the server understands, hence stringify). Also, the Net Ninja’s YT tutorial on fetch is 👌. |