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}}
CodeMeaning
200OK
201Created
302Redirect (look at the Location header)
400Bad request (malformed input)
401Authentication needed or invalid
403Forbidden: identified, but not allowed
404Not found (some apps also use it to hide things you're not allowed to see)
500Server 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.

kali@kali: ~

1. Log in with curl, showing the full exchange (-v). Use the JSON body {"email":"alice@lab.test","password":"Lab-Pass-1"}.

┌──(kali㉿kali)-[~]
└─$

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
0 of 6 answered

Check your understanding0 of 3 correct

Question 1

1.What's the difference between 401 and 403?

Question 2

2.Why redact the token in saved evidence?

Question 3

3.A request returns 200. Does that prove access control is working?

Quiz score: 0 of 3

Tip: answer every quiz question correctly first.

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.