Requestly
Try Now
Pricing
Blog
Contact
Search…
Introduction
Getting Started
🛠
Installation
Understanding Rule Operators
Troubleshooting Browser Extension
Rules
Remote Rules
Replace Rule
User-agent Modification Rule
Modify HTTP(s) Request & Response Headers
Modify Response Rule
Map Local
Mock GraphQL API response
Modify Response - FAQs
Custom Script Rule
Source Filters
Mock Server
Desktop App
Getting Started - Setup Guide
Troubleshooting
Managing Rules
Using Groups
Pinning Rules & Groups
Sharing Rules via Shared List
Backup Data
Library
Introduction to Library
Managing Library
Uninstalling
Deactivate Extension
Requestly FAQs
Premium Subscription
Mobile Interceptor
Introduction
Android SDK
Tutorial
Powered By
GitBook
Modify Response Rule
The Modify Response Rule allows you to mock the response body of an HTTP request.
Some possible use cases of this rule includes:
You want to work on front-end while back-end is not available or ready yet
You want to modify API responses but don't have access to the back-end.
You want to mock fluctuating API responses
You want to test application behaviour when provided altered data source
fetch() API is supported in Chrome, MS Edge. For Safari & Firefox, you can use our desktop app.
Using Modify Response Rule
Navigate to your
Requestly Dashboard
and click on New Rule
Click "New Rule" button
Choose the Modify Response Rule
Choose Modify Response Rule
Enter the matching conditions to target your API. To add advance filters, click on Add Filters link on the right.
Specify matching conditions
Enter the Response Body you expect.
Enter expected Response Body
If you want to modify using existing/original response, use the modify using javascript feature.
Modify using JavaScript
Save the Rule and see it working in action.
When you change the rule, please refresh the page on which you want to test your AJAX response modification
You can also use the
Request Payload filter
as well as other
source filters
to get more control over which requests are being targeted by the rule
See
modify response - FAQs
for more information on using this rule.
Rules - Previous
Modify HTTP(s) Request & Response Headers
Next
Map Local
Last modified
3mo ago
Copy link
Contents
Using Modify Response Rule