HTTP Request Builder
Test REST APIs and build HTTP requests directly in your browser.
No collections yet.
| Query Key | Value | |
|---|---|---|
| Key | Value | |
|---|---|---|
Response
Request Failed
| Header Key | Value |
|---|---|
No Request Selected
Select a request from your workspace sidebar on the left, or create a new collection to get started.
What Is an HTTP Request Builder?
An HTTP Request Builder is a tool that lets you create and send HTTP requests to web servers and APIs. Instead of manually constructing requests with command-line tools or writing application code, you can configure the request using a visual interface.
An HTTP request typically contains several components, including:
Request URL or API endpoint
HTTP method
Query parameters
Request headers
Authentication information
Request body
Content type
After sending a request, you can inspect the server response, including the response status, headers, and returned data.
An HTTP Request Builder is useful for API testing, REST API development, debugging, troubleshooting, and learning how web APIs communicate.
How to Use the HTTP Request Builder
Using the HTTP Request Builder is simple:
1. Enter the API URL
Start by entering the URL of the API endpoint you want to test. For example:
https://api.example.com/users
Make sure the endpoint is accessible and that you have permission to send requests to it.
2. Select an HTTP Method
Choose the HTTP method required by the API. Common methods include:
GET – Retrieve information from a server.
POST – Send data to create a new resource.
PUT – Replace or update an existing resource.
PATCH – Partially update an existing resource.
DELETE – Remove a resource.
3. Add Query Parameters
Query parameters allow you to pass additional information through the URL.
For example:
https://api.example.com/users?page=2&limit=10
Parameters are commonly used for filtering, searching, pagination, sorting, and controlling API responses.
4. Configure HTTP Headers
Headers provide additional information about an HTTP request. Common headers include:
Content-TypeAcceptAuthorizationUser-AgentCustom API headers
For example:
Content-Type: application/json
Headers are especially important when working with APIs that require a specific content type or authentication mechanism.
5. Add Authentication
Many APIs require authentication before they accept requests. Depending on the API, authentication may use an API key, Bearer token, Basic Authentication, or another authorization mechanism.
Always follow the authentication requirements documented by the API provider.
6. Add a Request Body
POST, PUT, and PATCH requests frequently send data in the request body. JSON is one of the most common formats used by modern REST APIs.
Example JSON request body:
{
"name": "John Doe",
"email": "john@example.com"
}7. Send the Request
After configuring the URL, method, parameters, headers, authentication, and body, send the request and inspect the API response.
This makes it easier to identify incorrect parameters, authentication problems, invalid request bodies, and unexpected server responses.
HTTP Methods Supported
Understanding HTTP methods is important when testing REST APIs.
GET
The GET method is used to retrieve data from an API or web server.
Example:
GET /users
GET requests commonly use query parameters to filter or control the returned results.
POST
The POST method is generally used to submit data or create a new resource.
Example:
POST /users
A POST request commonly includes a JSON request body.
PUT
The PUT method is commonly used to replace or update an existing resource.
Example:
PUT /users/123
The request body typically contains the data that should be stored for the resource.
PATCH
The PATCH method is used for partial updates.
Example:
PATCH /users/123
Unlike PUT, PATCH can be used when only specific fields need to be changed.
DELETE
The DELETE method is used to remove a resource.
Example:
DELETE /users/123
When testing DELETE endpoints, make sure you understand the effect of the request before sending it to a production system.
HTTP Request Components
An HTTP request consists of multiple parts that work together to communicate with a server.
URL
The URL identifies the server and API endpoint that receives the request.
Example:
https://api.example.com/products
Query Parameters
Query parameters provide additional values to an endpoint.
Example:
?category=books&page=2
They are commonly used for searching, filtering, pagination, and sorting.
Headers
HTTP headers provide metadata about the request.
For example:
Authorization: Bearer YOUR_TOKEN
and:
Content-Type: application/json
Request Body
The request body contains data sent to the server. JSON is commonly used with REST APIs, although APIs can support other formats.
Authentication
Authentication allows an API to verify that a request is authorized. Common authentication approaches include API keys, Bearer tokens, and Basic Authentication.
Common HTTP Request Examples
GET Request
A basic GET request can be used to retrieve a list of users:
GET https://api.example.com/usersGET Request with Query Parameters
You can add parameters to filter or paginate results:
GET https://api.example.com/users?page=1&limit=20POST Request with JSON
A POST request can send JSON data to an API:
POST https://api.example.com/users
Content-Type: application/jsonRequest body:
{
"name": "Jane Doe",
"email": "jane@example.com"
}Authenticated API Request
An API may require an authorization header:
Authorization: Bearer YOUR_API_TOKENThe exact authentication format depends on the API you are testing.
Why Use an Online HTTP Request Builder?
An online HTTP Request Builder can be useful when you need to test an API quickly without setting up a separate development environment.
Quick API Testing
Create and send requests directly from your browser instead of writing temporary code for every API test.
Debugging APIs
Inspect requests and responses to help identify problems with URLs, parameters, headers, authentication, and request data.
REST API Development
Developers can use an HTTP request tester to verify API endpoints while building or maintaining REST APIs.
Learning HTTP
Students and developers who are learning HTTP and REST APIs can experiment with different request methods and configurations in a visual environment.
No Additional Installation
A browser-based HTTP request tool can be convenient when you need to test an endpoint without installing a dedicated API client.
Environment Variables
When working with multiple API requests, environment variables can make request configuration easier.
The HTTP Request Builder supports variables using the {{variable_name}} syntax. Variables can be used in URLs, headers, and request bodies to reuse values across requests.
For example:
{{base_url}}/usersThis can be useful when switching between development, testing, and other API environments.
API Testing and Debugging Use Cases
The HTTP Request Builder can be used for a variety of development and testing tasks, including:
Testing REST API endpoints
Debugging API requests
Testing GET and POST endpoints
Sending JSON request bodies
Testing HTTP headers
Checking authentication requirements
Testing query parameters
Troubleshooting API responses
Learning HTTP methods
Verifying API integrations
Testing development and staging APIs
Quickly reproducing API requests
Is It Safe to Test APIs Online?
Always consider the sensitivity of the data and credentials you send when testing an API.
Avoid sending production secrets, passwords, private tokens, personal information, or other sensitive data to endpoints you do not control or trust. Before testing an API, verify the endpoint and understand what the request will do.
DevToolbox is designed around client-side processing for its tools, but API requests themselves can communicate with the destination servers you specify. Always follow the security and privacy requirements of the API you are testing.