Getting Started
Getting Started
Installation
Installation
Inspect Traffic
Inspect Traffic
HTTP Rules (Modify Traffic)
HTTP Rules (Modify Traffic)
Overview
Request Modification — Redirect URL (Map Local, Map Remote)
Request Modification — Replace Strings (Switch Hosts, API Endpoints)
Request Modification — Modify Headers
Request Modification — Modify Request Body
Response Modification — Modify Response Body
Request Modification — Modify Query Params
Request Modification — Modify User Agents
Request Modification — Delay Request
Request Modification — Map Local
Request Modification — Map Remote
Response Modification — Modify DOM/Inject scripts
Response Modification — Cancel Rule
Predefined Functions
Organizing Rule — Grouping
Organizing Rule — Import/Export Rules from File
Organizing Rule — Pause/Resume Requestly
Organizing Rule — Rule Operators
Organizing Rule — Advance Targeting
Organizing Rule — Sharing Rules
Organizing Rule — Pinning Rules
GraphQL - Modify Request & Response
Import / Export — Charles Proxy Rules
Test Rules — Test URL Condition
Test Rules — Test this Rule
Session Book
Session Book
File Server
File Server
Public API
Public API
Guides
Guides
TroubleShooting
TroubleShooting
Subscription & Billing
Subscription & Billing
Getting Started
Getting Started
Installation
Installation
Inspect Traffic
Inspect Traffic
HTTP Rules (Modify Traffic)
HTTP Rules (Modify Traffic)
Overview
Request Modification — Redirect URL (Map Local, Map Remote)
Request Modification — Replace Strings (Switch Hosts, API Endpoints)
Request Modification — Modify Headers
Request Modification — Modify Request Body
Response Modification — Modify Response Body
Request Modification — Modify Query Params
Response Modification — Modify DOM/Inject scripts
Request Modification — Modify User Agents
Request Modification — Delay Request
Response Modification — Cancel Rule
Organizing Rule — Grouping
Organizing Rule — Import/Export Rules from File
Organizing Rule — Pause/Resume Requestly
Organizing Rule — Rule Operators
Organizing Rule — Advance Targeting
Organizing Rule — Sharing Rules
Request Modification — Map Local
Request Modification — Map Remote
Organizing Rule — Pinning Rules
GraphQL - Modify Request & Response
Import / Export — Charles Proxy Rules
Test Rules — Test URL Condition
Predefined Functions
Test Rules — Test this Rule
File Server
File Server
Public API
Public API
Guides
Guides
Session Book
Session Book
Subscription & Billing
Subscription & Billing
Make an API request
To hit an API endpoint and see the response, you need to specify the URL and other request attributes like method, query parameters, body and headers.
Prequisites
- You need to either use the Requestly Desktop application or install the Requestly extension in the browser to use the API client. (Get installation link)
Steps
- Click API Client link in the left sidebar of the Requestly application.
- Select the request method from dropdown. GET should be selected by default.
- Enter the URL in the input box next to request method dropdown.
- Enter the fields like query parameters, body and headers under the URL.
- Click Send button next to URL.
In the section below the API request fields, you would find all the details of the received response.
Page structure
Let's try to understand each part of the API Client editor.
- On left hand side, we see a history of all API requests triggered so far.
- On right hand side, we have two sections. The top section is for Request attributes and the bottom section is for Response attributes.
Request section
In the Request section, you may select the HTTP method, enter the URL, enter query parameters, define body and specify headers to send in the request.
Select method and enter URL
Select the appropriate HTTP method for the request from the dropdown and enter the URL.
Enter query parameters
In the Query Params tab, you may enter query parameters to send in the request as key-value pairs.
These query parameters will be appended to the entered URL to obtain the final URL used to trigger the request.
For example, if the endpoint URL is https://example.com/api and query parameters are:
- uid = 123
- env = stage
The final request URL will be: https://example.com/api?uid=123&env=stage
Define request body
You may define a request body if the HTTP method is selected as anything other than GET or HEAD.
In the Body tab, you may select one of the 3 options to specify the content type - Raw, JSON or Form.
Enter Raw body
Select Raw option, if you want to send the request body as plain text. Enter the content in the text box.
A header content-type = text/plain will automatically be added in the request. However, you may edit it in Headers tab.
Enter JSON body
Select JSON option, if you want to send a JSON in the request body. Enter the JSON content in the text box.
You may also click Beautify button on the right to format the entered JSON.
A header content-type = application/json will automatically be added in the request. However, you may edit it in Headers tab.
Enter Form data
Select Form option, if you want to send form data in the request body. Enter the form data as key-value pairs.
A header content-type = application/x-www-form-urlencoded will automatically be added in the request. However, you may edit it in Headers tab.
Enter request headers
In the Headers tab, you may enter the headers to send in the request as key-value pairs.
Response section
In the Response section, you may find details like response body, response headers, status code, response time, and the redirected URL.
View response body
The first tab in the Response section shows the response body.
By default, it shows the preview of the response body, but you may also view the raw form of the response body by clicking Raw switch button in Response body tab.
The preview is supported only for response types - text, JSON, HTML and image.
View response headers
Switch to Headers tab in the Response section to view all the response headers.
View response status, time and other information
On the right hand side of the Response section, information like status code, response time and the redirected URL are displayed.
NOTE The API client currently works in the cookie-less mode, i.e., no cookie is sent in the request or set by the response.
Make an API requestPrequisitesStepsPage structureRequest sectionSelect method and enter URLEnter query parametersDefine request bodyEnter Raw bodyEnter JSON bodyEnter Form dataEnter request headersResponse sectionView response bodyView response headersView response status, time and other information