HTTP: HyperText Transfer Protocol: the set of rules browsers, apps, and servers use to send requests and responses over the web. It defines methods such as GET and POST, and status codes such as 200 OK and 404 Not Found.
Example
You open a product page. The browser sends GET /products/42 to the server; the server replies with status 200 and the page data. If the product doesn't exist, it replies with 404.
HTTP Methods
| Method | Used to | Example |
|---|---|---|
| GET | Read data | GET /orders |
| POST | Create something | POST /orders |
| PUT / PATCH | Update something | PATCH /orders/7 |
| DELETE | Remove something | DELETE /orders/7 |
Status Codes Worth Knowing
| Code | Meaning |
|---|---|
| 200 OK | The request worked |
| 201 Created | A new resource was created |
| 400 Bad Request | The input was invalid |
| 401 Unauthorized | Not logged in. See authentication. |
| 403 Forbidden | Logged in but not allowed. See authorization. |
| 404 Not Found | The resource doesn't exist |
| 500 Internal Server Error | Something failed on the server |
Easy rule: 2xx means success, 4xx means the client sent something wrong, 5xx means the server failed.
HTTP vs HTTPS
HTTPS is HTTP with encryption (TLS). It protects passwords and personal data from being read in transit. Every real website and API should use HTTPS.
HTTP in Interviews
A classic question is "What happens when you type a URL in the browser?" A good answer covers DNS lookup, connecting to the server, sending an HTTP request, the server's response, and the browser rendering the page. Also be ready to explain GET vs POST and a few status codes.
Related terms
- REST API: an API style built on HTTP methods.
- API: most web APIs use HTTP.
- JSON: the usual format of HTTP request and response bodies.
- Server: the machine that answers HTTP requests.
Previous term: HR Interview | Next term: Hybrid Work
Related guides
- Technical Interview Questions for Freshers
- Frontend vs Backend: Which Is Better for an Internship?
- DevOps Interview Questions Test
Frequently asked questions
What is HTTP in simple words?
HTTP is the set of rules that browsers, apps, and servers use to request and send data over the web.
What is the difference between GET and POST?
GET reads data and sends parameters in the URL. POST sends data in the request body, usually to create something.
What is the difference between 401 and 403?
401 means you are not authenticated. 403 means you are authenticated but not allowed to do that action.
What is the difference between HTTP and HTTPS?
HTTPS is HTTP with encryption, which protects data such as passwords while it travels between the browser and server.
Explore more internship terms
The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.
Browse all 199 terms