Auto Responder is a very powerful feature in Fiddler Everywhere. See how it can be used to mock requests.
is a must-have tool for every developer trying to debug HTTP issues for websites and mobile apps. Other than being able to inspect and monitor web traffic, Fiddler Everywhere also enables you to mock requests using the powerful Auto Responder feature.
If you are new here, Fiddler Everywhere is a tool for network debugging and monitoring. It logs all the HTTP(S) traffic between the client and the internet. The tool is handy to inspect, debug, mock, and share network requests and responses. You can check out this starter guide to get you started with Fiddler Everywhere.
With the Fiddler Everywhere Auto Responder feature, you can simulate such issues locally and test them against various parameters without updating the production server. This feature allows you to quickly test multiple scenarios without having to mess with the code in production. This feature is also handy to reproduce previously captured bugs in isolation.
When it comes to functionality, the Auto Responder feature in Fiddler Everywhere allows you to create “Rules” that get triggered when the particular request is issued. Fiddler Everywhere has an Auto Responder Rules Editor, which will enable you to create new rules and edit existing rules quickly.
To create new rules, you can either click the “Add New Rule” button in the Auto Responder or right-click on the required web session and select “Add New Rule.” The Rules Editor will open up. The Rules Editor has the Match section, which maps to the Action section.
The Match section makes it simple to specify a match condition to identify the specific or multiple requests. You can provide string literals, regular expressions, and even specific match conditions. By default, Fiddler Everywhere performs a case-insensitive match against the request URLs.
You can type a word in the Match section, and all requests having the word would be identified. For example, the word “academic” will match the following request URLs:
You can provide specific directives by using following parameters:
- “EXACT:URL” – matches with request URL exactly, case-sensitively.
- “NOT:string” – matches with request URLs that do not contain the mentioned string could be an URL, URL path, or even a word in the URL.
- “regex:string” – matches a regular expression against the request URL. Fiddler Everywhere uses the .NET regular expression engine to evaluate these expressions.
When Fiddler Everywhere identifies a request which matches the Auto Responder Rule, it automatically bypasses the server and maps it to the Action mentioned in the ruleset. The Auto Responder rule actions include:
“*reset” – Breaks the client connection without sending a response.
“*delay:x” – Delays the request to the server by “x” milliseconds.
“*ReplyWithTunnel” – Responds with an HTTP/200 tunnel for HTTPS traffic. Example: CONNECT method.
“*CORSPreflightAllow” – Allows access to the Cross-Origin-Resource-Sharing (CORS) requests.
“*header:HeaderName=NewValue” – Changes the header value to the specified value.
“*redir:https://example.com” – Redirects (HTTP/307) to the target URL mentioned.
“https://example.com” – Returns the target URL as a reposnse.
“Return manually crafted response” – Allows modifying the current response (HTML, JS, JSON) previously returned by the server.
If you have already selected a web session, the request automatically gets copied in the “Match” section with an Exact match condition. The action by default is to “Return manually crafted response.”
Auto Responder Rules Queue
The Auto Responder tab has the rules in the queue. You can turn on or off any or multiple rules by switching the toggle button next to the rule. Fiddler Everywhere applies rules to the web sessions in the exact order that they appear in the Auto Responder Queue. However, you can promote or demote the rules using the arrow buttons in the queue. You can also group rules to make it simpler to manage.
Fiddler Everywhere allows you to share individual rulesets by entering an email id. Alternatively, you can also export the rules by creating a FARX file of the rules. Similarly, you can import the rulesets into Fiddler Everywhere using a FARX file.
When the Auto Responder is enabled, Fiddler Everywhere will match every request against the rules. For any request that does not match the conditions, Fiddler Everywhere will return an “HTTP/404 Not Found” response. To prevent this, you need to enable the “Unmatched Request Passthrough” option to send the requests to the server instead of the Auto Responder.
Get Fiddler Everywhere
These are some of the powerful actions that Fiddler Everywhere can execute on behalf of a live server. These features are especially useful for testing and debugging purposes. If you haven’t tried this out yet, check it out now and let us know what you think. Download it now. Fiddler Everywhere is available on Windows, macOS, and Linux and supports every browser.