Charles crawls HTTP requests in detail

Source: Internet
Author: User

I used Charles to grab the bag, but I never summed it up, and today we talk about how Charles grabbed the packet, modified the request, and modified the return value.

I. INTRODUCTION of Charles

Charles is a cross-platform grab kit that can be used under Windows,mac.linux, and the main function is as follows:

1, check out the request sent

2, positioning problems, location analysis is the server side of the problem or the client's problem

3, help to simulate some of the service side return abnormal situation

4, mobile phone grab bag, need attention:

(1) must ensure that the mobile phone and the computer is in the same LAN.

(2) Get to the computer IP address, look at the port number of Charles, the default port number is 8888, the user can set their own.

Second, check out the request sent

Open Charles, if you want to see 58 of the same city request, on the left side of the structure found 58 of the same city domain name, here is mainly the domain name as a node display, click/,

Looking at the right window, the request and the returned results are shown here in detail.

Note: Many sites now use HTTPS, many times can not catch the package, where the use of HTTP, it is easy to catch.

Iii. changes to the request made

In the package that was caught in the previous step, select 58.com, click Proxy->enable breakpoints, empty the captured data, and re-enter 58.com in the browser as follows:

Click Execute to execute after the modification.

Iv. Modification of Reponse

Modified to:

The result is:

Five, mobile phone grab bag

1. Check your computer's IP

Look at the Charles Proxy port as follows:

2, on the phone set the manual proxy IP for the computer IP, the port is 8888, can be saved.

Charles crawls HTTP requests in detail

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.