Use Fiddler to debug your mobile app backend API interface

Source: Internet
Author: User

We are doing mobile app (ANDROID,IOS,WP, etc.), due to the need and the server interface for data interaction, in order to debug the background interface, you need to separate the development library to play a version of the app for testing, in fact, not so troublesome, directly using the version of the official server address.

A Web development debugging artifact is recommended here, fiddler not only to debug your Web system, but also to debug your mobile app.

For fiddler basic tutorial and introduction, here I do not explain, we can find resources on the Internet to learn about Fiddler, I here to recommend a series of blog posts about fiddler:

Http://www.cnblogs.com/TankXiao/archive/2012/02/06/2337728.html

Small tank of a series of tutorials on fiddler, Basic Learning, set up mobile phone agent interception and so on.


What I want to learn here is that the hosts of fiddler.

First of all, the phone settings agent to their own computer, you can refer to the small tank tutorial set up a bit.

Click on the Fiddler Tools menu and click HOSTS

In the box below, you can set the host's forwarding rules:

Let's take a look at the official simple example:

The example is very clear, is the first host for you to forward to the address, the second is the address you want to forward. At least one space interval is used in the middle. It is recommended to use a tab

That's a bit of a detour, for example, the following example:

192.168.0.69:8020 www.sina.com.cn

Here fiddler will intercept the request to host www.sina.com.cn and forward it to 192.168.0.69:8020

Note that this is to write the port number, if not write the default is 80 port, as above www.sina.com.cn is 80 port

As shown below:

For me to access the http://www.sina.com.cn/HTML5/index.html page on my phone, fiddler forwarded the Request to me (Sina certainly does not exist http://www.sina.com.cn/HTML5/ Index.html this request, do not believe you visit to try? )

This is my local project:

Believe you see here, you know what I want to say, for a mobile app, we do not have to separate for testing server separately packaged for testing, using Fiddler's host forwarding function directly with the official version of the test.

Note that fiddler can only intercept HTTP,HTTPS requests, for HTTPS, but also need to set up a separate, in the above introduction of the small tank tutorial is described, please do their own research.






Use Fiddler to debug your mobile app backend API interface

Related Article

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.