π GET Requests¶
In this section, you will learn how to work with GET requests, the most common type of HTTP request used in web applications and APIs.
A GET request is used to retrieve data from a server. Unlike POST requests, it does not send complex data in the body. Instead, all information is typically passed through the URL using query parameters.
π§ What is a GET Request?¶
A basic GET request looks like this:
This simply asks the server:
βGive me the data available at this endpoint.β
π Query Parameters¶
GET requests often include parameters in the URL to modify the response.
Example:
Breakdown:¶
?β starts query parametersname=adminβ parameter key/value&β separates multiple parameters
π Full URL example:
π₯οΈ Using curl (Terminal)¶
curl is a command-line tool used to send HTTP requests.
πΉ Basic GET request¶
πΉ GET request with parameters¶
π Quotes are important when using & in URLs (especially in Linux/macOS).
πΉ Adding headers (optional)¶
Although GET requests usually donβt require headers, you can still include them:
π±οΈ Using Postman (GUI)¶
Postman provides a graphical interface for sending requests.
πΉ Basic steps¶
- Open Postman
- Set method to GET
- Enter URL:
πΉ Adding query parameters¶
Instead of typing them manually in the URL:
- Go to the Params tab
-
Add key-value pairs:
-
nameβadmin ageβ18
Postman will automatically build:
πΉ Adding headers¶
- Go to the Headers tab
-
Add:
-
Key β
Custom-Header - Value β
value
β οΈ Important Notes¶
- GET requests should not modify server data (they are read-only)
- Parameters are visible in the URL
- There is no request body in standard GET usage
- Some servers may behave differently, but in this CTF we follow standard behavior
π§© In This CTF¶
You will often need to:
- Discover correct parameter names
- Guess valid values (e.g.,
admin) - Modify URLs manually
- Observe how the server responds
Small changes in parameters can completely change the result β this is the key idea behind many challenges.
π Summary¶
- GET = retrieve data
- Parameters go in the URL
-
Use:
-
curlfor terminal-based requests - Postman for visual interaction
Mastering GET requests is the first step toward understanding how APIs work and how to interact with them effectively.