Postman REST and HTTP Basics
Every request you send in Postman travels over HTTP, the language that web servers speak. REST is a set of design habits that makes those conversations predictable. Knowing both gives you the vocabulary to read any API documentation and build the right request on the first attempt.
HTTP in Layman's Terms
Picture a restaurant. You sit at a table and read the menu. A waiter carries your order to the kitchen and brings the food back. HTTP works the same way. Your computer is the customer, the server is the kitchen, and HTTP is the waiter who carries messages in both directions.
CUSTOMER WAITER KITCHEN
(Postman) (HTTP) (Server)
│ │ │
│ "One pasta" │ │
├──────────────────►│ order slip │
│ ├──────────────────►│
│ │ │ cooks
│ │ plate of pasta │
│ pasta arrives │◄──────────────────┤
│◄──────────────────┤ │Anatomy of an HTTP Request
A request has three parts. Postman fills each part from the tabs below the URL bar.
GET /users/1 HTTP/1.1 ← Request line (method + path)
Host: jsonplaceholder.typicode.com ← Headers (extra details)
Accept: application/json
(empty for GET) ← Body (data you send)- Request line: names the method and the resource you want.
- Headers: carry details such as the data format you accept.
- Body: holds the data you send, mostly with POST, PUT, and PATCH.
What Makes an API RESTful
REST stands for Representational State Transfer. The name sounds heavy, yet the idea is light: treat everything as a resource, give each resource an address, and use standard methods to act on it.
Resources and URLs
A resource is a thing the API manages, such as a user, an order, or a product. URLs use nouns and avoid verbs.
| URL | Meaning |
|---|---|
| /users | The whole list of users |
| /users/5 | The single user with ID 5 |
| /users/5/posts | Every post written by user 5 |
Methods as Verbs
The method tells the server what action to perform on the resource.
| Method | Action | Everyday Comparison |
|---|---|---|
| GET | Read data | Looking at a library catalog |
| POST | Create data | Adding a new book to the shelf |
| PUT | Replace data | Swapping an old book for a new edition |
| PATCH | Change part of the data | Fixing a typo on one page |
| DELETE | Remove data | Taking a book off the shelf |
Stateless Conversations
A REST server does not remember your earlier requests. Each request carries everything the server needs, including login proof. Think of a vending machine: every purchase needs fresh coins, and the machine never recalls your last visit. Stateless design lets servers handle thousands of users without tracking each one.
Anatomy of a Response
The server answers with a status code, headers, and usually a body. Postman displays all three in the lower panel.
HTTP/1.1 200 OK ← Status line
Content-Type: application/json ← Headers
{ ← Body
"id": 1,
"name": "Leanne Graham"
}Try It in Postman
- Click New and choose HTTP.
- Select GET in the method dropdown.
- Type
https://jsonplaceholder.typicode.com/users/1in the URL bar. - Click Send.
- Read the status code, the response time, and the JSON body in the lower panel.
Change the URL to /users and send again. The server now returns a list of ten users instead of one. The address changed, so the resource changed.
Common Beginner Mistakes
- Using a verb in the URL, such as
/getUsers, when the method already says GET. - Sending a body with a GET request, which most servers ignore.
- Forgetting the
Content-Typeheader when posting JSON data. - Mixing up PUT and PATCH. PUT replaces the full record, while PATCH updates selected fields.
Key Points
- HTTP is the messaging system between client and server.
- A request holds a method, a URL, headers, and an optional body.
- REST uses nouns for URLs and standard methods for actions.
- Stateless servers expect every request to be complete.
- Postman shows each part of the request and response in separate tabs.
