HTTP Methods
Samvad supports all standard HTTP methods, plus WebSocket connections.
Supported Methods
| Method | Description | Body | Typical Use |
|---|---|---|---|
GET |
Retrieve a resource | No | Fetch data |
POST |
Create a resource | Yes | Submit data |
PUT |
Replace a resource | Yes | Full update |
PATCH |
Partially update a resource | Yes | Partial update |
DELETE |
Remove a resource | Optional | Delete data |
OPTIONS |
Describe communication options | No | CORS preflight |
HEAD |
Same as GET but without body | No | Check headers |
WS |
WebSocket connection | — | Real-time |
Selecting a Method
Click the method dropdown on the left side of the URL bar to select any method. The dropdown is color-coded for quick identification:
- 🟢 GET — Green
- 🟡 POST — Amber
- 🔵 PUT — Blue
- 🟣 PATCH — Violet
- 🔴 DELETE — Red
- ⬡ OPTIONS / HEAD — Gray
- 🩵 WS — Cyan
GET
Used to retrieve data from a server. GET requests do not have a body.
GET https://api.example.com/users
Query parameters can be added in the Params tab and are automatically appended to the URL.
POST
Used to send data to a server to create a resource. Supports multiple body modes:
POST https://api.example.com/users
Content-Type: application/json
{
"name": "Alice",
"email": "alice@example.com"
}
See Request Body for all body modes.
PUT
Replaces a resource entirely. Usually requires the full resource representation.
PUT https://api.example.com/users/1
Content-Type: application/json
{
"id": 1,
"name": "Alice Updated",
"email": "alice@example.com"
}
PATCH
Partially updates a resource. Only send the fields you want to change.
PATCH https://api.example.com/users/1
Content-Type: application/json
{
"name": "Alice Renamed"
}
DELETE
Removes a resource. May include a body (optional).
DELETE https://api.example.com/users/1
OPTIONS
Typically used for CORS preflight requests. Samvad supports sending OPTIONS requests for debugging CORS issues.
HEAD
Identical to GET, but the server responds with headers only — no body. Useful for checking if a resource exists or inspecting metadata.
WebSocket (WS)
Select WS to open a WebSocket connection. See the WebSocket guide for full details.