r/Hacking_Tutorials • u/LilacTwiink • 23h ago
Question Beginner exercise: Rebuild a simple API request using only curl after inspecting it in the browser
If you're learning web requests hands-on, try this quick drill with any free practice site (like the ones on HackTheBox Academy or PortSwigger labs).
- Log in to the app normally while watching the Network tab. Find the POST request that actually authenticates or fetches your profile.
- Copy the exact URL, method, headers, and body fields shown.
- Close the browser tab completely, then open a terminal and rebuild the same request with curl. Include the Cookie or Authorization header you captured.
- Run it. Does the server still treat you as logged in? What status code and data come back?
- Now tweak one thing (change a header value, drop a cookie, or alter a JSON field) and rerun. Note which changes break authentication and which the server ignores.
The goal is seeing the exact pieces a browser normally hides from you. After doing this once or twice, inspecting API calls during actual testing becomes much faster.
What was the first request you successfully recreated outside the browser?
2
Upvotes