Module 1 · Scope, Recon and HTTP · Lesson 3 of 9
Reading HTTP requests and responses
Method, path, headers, body and status code: capture a request to the training app and compare it with a bad one.
In this lesson · about 22 minutes
- Identify the parts of an HTTP request and response
- Interpret common status codes
- Redact session credentials from evidence
Web testing is mostly reading and changing HTTP messages. A request looks like this:
POST /rest/user/login HTTP/1.1 ← method, path, version
Host: 127.0.0.1:3000 ← headers…
Content-Type: application/json
Cookie: language=en
{"email":"alice@lab.test","password":"••••••"} ← body
And the response:
HTTP/1.1 200 OK ← status line
Content-Type: application/json
Set-Cookie: token=eyJhbGciOi…; Path=/
{"authentication":{"token":"eyJhbGciOi…","bid":6}}
| Code | Meaning |
|---|---|
| 200 | OK |
| 201 | Created |
| 302 | Redirect (look at the Location header) |
| 400 | Bad request (malformed input) |
| 401 | Authentication needed or invalid |
| 403 | Forbidden: identified, but not allowed |
| 404 | Not found (some apps also use it to hide things you're not allowed to see) |
| 500 | Server error: unexpected input broke something, worth noting |
Status codes alone don't prove access control works. A 200 might return someone else's data; a 403 page might still leak it in the body. Always read the body.
Tools: your browser's developer tools (Network tab) or a proxy like Burp Suite Community show every request. In saved evidence, redact tokens and cookies: they're live credentials.
Hands-on lab (simulated terminal)
Practice challenge 02: one good request, one bad
The training app runs on your own machine at 127.0.0.1:3000. You created the dummy account alice@lab.test.
Step 1 of 2. Type each command and press Enter. Nothing runs on your computer.
1. Log in with curl, showing the full exchange (-v). Use the JSON body {"email":"alice@lab.test","password":"Lab-Pass-1"}.
Performance-based question (PBQ)
What does each status code tell you?
While testing the training app, you see these responses.
Pick the best interpretation.
- GET /api/Users with no token → 401
- Alice's token, GET /administration → 403
- Login with a body that isn't JSON → 400
- Search with a single quote ' → 500 and a database error message
- GET /login → 302 Location: /#/login
- Alice's token, GET /rest/basket/6 → 200 with her basket
Check your understanding0 of 3 correct
Quiz score: 0 of 3
Noviq Academy is free and for learning. Only test systems you own or have explicit written permission to test; unauthorised testing is illegal. Every lab here is simulated or runs locally on your own machine. OWASP, Juice Shop, Burp Suite and Nmap belong to their owners; this course is independent of them.