Using Fiddler to impersonate a client HTTP response "Go"

Source: Internet
Author: User

Go from: impersonate a client HTTP response using fiddler

In client development, it is often necessary to deal with some special cases, such as 404, 503, and so on, such as service return error data. Testing these situations can be cumbersome, often looking for developers to work with the code to modify, so the efficiency is not high.

After touching the Fiddler, this is not the case, we can easily simulate the HTTP response via the Fiddler's own Autoresponder tool. Fiddler's Autoresponder Tab allows you to return files locally without sending an HTTP request to the server.

Here's the tutorial:

1. First crawl the HTTP request of the client (refer to another article Android/ios phone using fiddler grab bag)

2. Open Fiddler to find Autoresponder

3. Select Enable automatic reaponses and unmatched requests passthrough

4. Select the HTTP request that you snapped to the left and click Add Rule

5. In the following rule Editor drop-down Select the response type to simulate, 200, 404, 502, etc. (you can also create Response yourself, check the Create New Response ..., if you want to replace some paging file, select Find a file). Finally click Save.

6. After the rule is established, the request to the original URL becomes the response you specified, and then the original URL can be requested to see the effect.

A regular expression is used at the link :

The prefix "Exact:" indicates an exact match (case sensitive)

No prefix indicates a basic search, which means that the search string matches

The prefix is "REGEX:" to indicate the use of regular expression matching

The prefix is "REGEX: (? insx)" to indicate the matching method where:

I means case insensitive;

n indicates that the only valid capture specified is the form of an explicit name or number;

s denotes single-line mode;

x denotes a space description;

OK, no longer need to find developers to modify the code!

Using Fiddler to impersonate a client HTTP response "Go"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.