Web Requests
Executive Summary
This cheatsheet is a quick reference for HTTP requests, headers, methods, status codes, cookies, and common curl usage.
Use it when testing web applications, reproducing Burp requests, reviewing logs, or troubleshooting web behavior.
HTTP Methods
| Method | Purpose |
|---|---|
GET |
Retrieve a resource |
POST |
Submit data |
PUT |
Replace or upload a resource |
PATCH |
Partially update a resource |
DELETE |
Delete a resource |
HEAD |
Retrieve headers only |
OPTIONS |
Show supported methods |
Common Status Codes
| Code | Meaning |
|---|---|
200 |
OK |
201 |
Created |
204 |
No Content |
301 |
Moved Permanently |
302 |
Found / Redirect |
304 |
Not Modified |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
405 |
Method Not Allowed |
429 |
Too Many Requests |
500 |
Internal Server Error |
502 |
Bad Gateway |
503 |
Service Unavailable |
Common Headers
| Header | Purpose |
|---|---|
Host |
Target hostname |
User-Agent |
Client software |
Cookie |
Session or tracking data |
Authorization |
Auth token or credentials |
Content-Type |
Request body format |
Accept |
Expected response format |
Origin |
Source origin for CORS |
Referer |
Previous page |
X-Forwarded-For |
Original client IP, often proxy-related |
Location |
Redirect destination |
Set-Cookie |
Server sets cookie |
Content Types
| Content-Type | Use |
|---|---|
application/x-www-form-urlencoded |
Standard HTML form body |
multipart/form-data |
File uploads |
application/json |
JSON API request |
application/xml |
XML request |
text/plain |
Plain text body |
Basic Curl
GET request:
Show headers only:
Verbose output:
Follow redirects:
Save response to file:
Ignore TLS certificate errors:
Curl with Headers
Add header:
Set User-Agent:
Set Host header:
Add cookie:
Add bearer token:
POST Requests
Form POST:
JSON POST:
Upload file:
PUT upload:
Cookies
Save cookies:
Use cookies:
Send cookie manually:
Proxying Through Burp
Send curl traffic through Burp:
For HTTPS with Burp:
Common Test Headers
Forwarded IP:
Real IP:
Original URL:
Rewrite URL:
JSON content type:
Manual Request Example
GET /admin HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0
Cookie: session=VALUE
Accept: */*
Connection: close
Access Control Request Tests
| Test | Action |
|---|---|
| Remove auth | Delete Cookie or Authorization header |
| Change user ID | Modify id, user, or object parameters |
| Change method | Try GET, POST, PUT, DELETE |
| Change content type | Try JSON vs form encoding |
| Add proxy headers | Test X-Forwarded-For and similar headers |
| Direct path access | Request hidden or admin paths manually |
Useful Grep Patterns
Search URLs:
Search JavaScript endpoints:
Search for secrets:
Notes
401usually means authentication is required.403usually means authentication worked but access is denied.302after login may indicate success.- Response length changes can reveal behavior even when status codes match.
- Always compare requests from different user roles when testing access control.