The API client
in Requestly allows you to easily send API requests, such as HTTP and GraphQL, without the need for writing code or using a terminal. It lets you test APIs, retrieve data, and explore how they work by simply creating a request, clicking Send, and viewing the response within Requestly.
This feature is perfect for developers testing API endpoints during development, QA engineers validating API responses for edge cases, and support engineers debugging API issues in real-time.
Send Your First API Request
Step 1: Open API Client and Create a New Request
Click the API Client link in the left sidebar of the Requestly application, then click the + New
button to create a new request and select Request from the menu.
Step 2: Name Your API Request
Choose a descriptive title for your request to make it easy to identify later.
Step 3: Enter the API URL and HTTP Method
Pick the HTTP method (e.g., GET, POST) and type the URL of the API you want to test.
Step 4: Save & Send the Request
Click the Save & Send button to execute your request.
Response
1. View the Response Body
Once the request is sent, check the response body in the Response Body section. You can switch between formatted (pretty) and raw views.
2. Check the Response Headers
Review the headers sent back by the server in the Headers tab.
Query Parameters
In the Query Params section, you can add query parameters as key-value pairs to send extra information with the URL. To add more parameters, click on the + Add More
button.
For example:
- Adding
uid=123
tohttps://app.requestly.io/echo
results in:https://app.requestly.io/echo?uid=123
The checkboxes next to each parameter let you include or exclude them without deleting them. For instance, if you uncheck the Key
parameter, the final URL will not include it
Request Body
For POST or PUT requests, use the Body tab to send data:
-
RAW: Send raw data.
-
JSON: Send data in JSON format.
-
Form: Send key-value form data. The system automatically sets headers like
Content-Type
, but you can adjust these in the Headers tab.
Headers
The Headers tab allows you to include additional information in your API request. Headers are key-value pairs that provide essential details for the request, such as authentication tokens, content type, or other metadata required by the API. To add more headers, click on the + Add More
button.
For example: You can add headers like Authorization: Bearer <token>
to authenticate your request, or Content-Type: application/json
to specify the format of the data you're sending.
The checkboxes next to each parameter let you include or exclude them without deleting them. For instance, if you uncheck the Key
parameter, the final URL will not include it
Scripts
-
Pre-Scripts: Execute code before sending the request, like generating tokens or setting dynamic headers.
-
Post-Scripts: Execute code after receiving the response, useful for processing or saving the response data.
To learn more about using scripts visit Scripts Documentation.