---
title: "What are HTTP Methods? How many types?"  
description: "What are HTTP Methods? How many types?"  
author: "ICSM Computer"  
published: 2026-03-24  
updated: 2026-03-24  
canonical: https://www.mindstick.com/interview/34481/what-are-http-methods-how-many-types  
category: "web api"  
tags: ["web api"]  
reading_time: 6 minutes  

---

# What are HTTP Methods? How many types?

**HTTP Methods** are used in **Web API / Web Development** to tell the server what action we want to perform on a resource.\
When a client (browser, mobile app, API) sends a request to server, it uses an HTTP method like **GET, POST, PUT, DELETE** etc.

HTTP works on **Request → Response** model.

Example request:

```plaintext
GET /api/users/10
```

Here **GET** is HTTP Method.

## How many HTTP Methods are there?

Mainly **9 HTTP Methods** are defined in HTTP standard, but commonly used are **5–7 methods**.

| Method | Use | Description |
| --- | --- | --- |
| GET | Read | Get data from server |
| POST | Create | Send new data |
| PUT | Update | Update full data |
| PATCH | Partial Update | Update some fields |
| DELETE | Remove | Delete data |
| HEAD | Header only | Get header only |
| OPTIONS | Check methods | Check allowed methods |
| TRACE | Debug | Loopback test |
| CONNECT | Tunnel | Used for SSL |

Most used methods:

```plaintext
GET
POST
PUT
PATCH
DELETE
```

## 1. GET Method

Used to **read data** from server.

Example:

```plaintext
GET /api/users
GET /api/users/5
```

Rules:

- Should not change data
- Safe method
- Used for fetch

Example response:

```plaintext
{
  "id": 5,
  "name": "John"
}
```

## 2. POST Method

Used to **create new data**.

Example:

```plaintext
POST /api/users
```

Body:

```plaintext
{
  "name": "John",
  "email": "john@mail.com"
}
```

Use when:

- Insert data
- Submit form
- Upload file

## 3. PUT Method

Used to **update full data**.

Example:

```plaintext
PUT /api/users/5
```

Body:

```plaintext
{
  "name": "John Updated",
  "email": "john@mail.com"
}
```

Rules:

- Replace full object
- Id required

## 4. PATCH Method

Used to **update partial data**.

Example:

```plaintext
PATCH /api/users/5
```

Body:

```plaintext
{
  "name": "New Name"
}
```

Use when:

- Update only some fields
- Faster than PUT

## 5. DELETE Method

Used to **remove data**.

Example:

```plaintext
DELETE /api/users/5
```

Use when:

- Delete record
- Remove resource

Response:

```plaintext
200 OK
```

## 6. HEAD Method

Same as GET but returns **only header**.

Example:

```plaintext
HEAD /api/users
```

Use for:

- Check API
- Check size
- Check status

No body returned.

## 7. OPTIONS Method

Used to check allowed methods.

Example:

```plaintext
OPTIONS /api/users
```

Response:

```plaintext
GET, POST, PUT, DELETE
```

Used in:

- CORS
- API check
- Browser request

## 8. TRACE Method

Used for debugging.

Example:

```plaintext
TRACE /api/users
```

- Server returns same request.
- Rarely used.

## 9. CONNECT Method

Used for secure connection.

Used in:

- HTTPS
- Proxy
- SSL tunnel

Example:

```plaintext
CONNECT server.com:443
```

Rare in normal API.

## Summary

| Method | Use |
| --- | --- |
| GET | Read |
| POST | Create |
| PUT | Update full |
| PATCH | Update partial |
| DELETE | Remove |
| HEAD | Header only |
| OPTIONS | Check methods |
| TRACE | Debug |
| CONNECT | Secure tunnel |

## Interview Answer (Short)

> HTTP methods are used to perform operations on server resources. Main HTTP methods are GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE, CONNECT. Most commonly used methods in Web API are GET, POST, PUT, PATCH, DELETE.

## Answers

### Answer by ICSM Computer

**HTTP Methods** are used in **Web API / Web Development** to tell the server what action we want to perform on a resource.\
When a client (browser, mobile app, API) sends a request to server, it uses an HTTP method like **GET, POST, PUT, DELETE** etc.

HTTP works on **Request → Response** model.

Example request:

```plaintext
GET /api/users/10
```

Here **GET** is HTTP Method.

## How many HTTP Methods are there?

Mainly **9 HTTP Methods** are defined in HTTP standard, but commonly used are **5–7 methods**.

| Method | Use | Description |
| --- | --- | --- |
| GET | Read | Get data from server |
| POST | Create | Send new data |
| PUT | Update | Update full data |
| PATCH | Partial Update | Update some fields |
| DELETE | Remove | Delete data |
| HEAD | Header only | Get header only |
| OPTIONS | Check methods | Check allowed methods |
| TRACE | Debug | Loopback test |
| CONNECT | Tunnel | Used for SSL |

Most used methods:

```plaintext
GET
POST
PUT
PATCH
DELETE
```

## 1. GET Method

Used to **read data** from server.

Example:

```plaintext
GET /api/users
GET /api/users/5
```

Rules:

- Should not change data
- Safe method
- Used for fetch

Example response:

```plaintext
{
  "id": 5,
  "name": "John"
}
```

## 2. POST Method

Used to **create new data**.

Example:

```plaintext
POST /api/users
```

Body:

```plaintext
{
  "name": "John",
  "email": "john@mail.com"
}
```

Use when:

- Insert data
- Submit form
- Upload file

## 3. PUT Method

Used to **update full data**.

Example:

```plaintext
PUT /api/users/5
```

Body:

```plaintext
{
  "name": "John Updated",
  "email": "john@mail.com"
}
```

Rules:

- Replace full object
- Id required

## 4. PATCH Method

Used to **update partial data**.

Example:

```plaintext
PATCH /api/users/5
```

Body:

```plaintext
{
  "name": "New Name"
}
```

Use when:

- Update only some fields
- Faster than PUT

## 5. DELETE Method

Used to **remove data**.

Example:

```plaintext
DELETE /api/users/5
```

Use when:

- Delete record
- Remove resource

Response:

```plaintext
200 OK
```

## 6. HEAD Method

Same as GET but returns **only header**.

Example:

```plaintext
HEAD /api/users
```

Use for:

- Check API
- Check size
- Check status

No body returned.

## 7. OPTIONS Method

Used to check allowed methods.

Example:

```plaintext
OPTIONS /api/users
```

Response:

```plaintext
GET, POST, PUT, DELETE
```

Used in:

- CORS
- API check
- Browser request

## 8. TRACE Method

Used for debugging.

Example:

```plaintext
TRACE /api/users
```

- Server returns same request.
- Rarely used.

## 9. CONNECT Method

Used for secure connection.

Used in:

- HTTPS
- Proxy
- SSL tunnel

Example:

```plaintext
CONNECT server.com:443
```

Rare in normal API.

## Summary

| Method | Use |
| --- | --- |
| GET | Read |
| POST | Create |
| PUT | Update full |
| PATCH | Update partial |
| DELETE | Remove |
| HEAD | Header only |
| OPTIONS | Check methods |
| TRACE | Debug |
| CONNECT | Secure tunnel |

## Interview Answer (Short)

> HTTP methods are used to perform operations on server resources. Main HTTP methods are GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE, CONNECT. Most commonly used methods in Web API are GET, POST, PUT, PATCH, DELETE.


---

Original Source: https://www.mindstick.com/interview/34481/what-are-http-methods-how-many-types

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
