03 / Web / 35 min READ + PRACTICE
HTTP requests and safe test apps.
Read methods, headers, bodies, redirects and response codes using an application you own.
Trace a request end to end
A URL identifies scheme, host, port and path. A request has a method, headers and optionally a body; the response carries a status, headers and data. Use browser developer tools to compare a page request with its CSS and API requests.
Generate your own endpoint
Run python3 -m http.server 8000 --bind 127.0.0.1 from a folder with an index.html file. Use curl to inspect status and headers, then change the path to a missing file and compare the 404. The default file server is for local exercises, not production deployment.
python3 -m http.server 8000 --bind 127.0.0.1
curl -i http://127.0.0.1:8000/
curl -i http://127.0.0.1:8000/not-found Separate observation from an exploit
Use test inputs in your own app to see how validation behaves. Encode user-provided output, limit request bodies, and do not assume client-side validation is enough. Capture the expected and actual response rather than making a claim without evidence.
Try it in your lab
Create an index.html, serve it locally, and record the status and Content-Type for the page and a missing path.
Make sure it clicks
Why can a browser-side required field not replace server-side input validation?
A prompt you can adapt
Build a tiny localhost-only Python HTTP example that validates a short form input and returns clear 400 responses; include tests.How to set up OpenCode ↗