HTTP Grab Kit Charlse use tutorial

Source: Internet
Author: User
Tags browser cache

"Original" http://blog.csdn.net/wildfireli/article/details/19829479

Charles is currently the most powerful HTTP debugging tool, the interface and functionality far stronger than fiddler, but also the full platform support, called the Grail-level tool, the only drawback is that the goods are charged, and is to ¥ $50 ocean ... Of course, there are cracked version of the Internet, despise their own, shameless use of ... Put in the net disk, the pro can silently take away, do not leave a cloud.

Cracked version of the portal.

First install the original inside, and then copy Charles.jar to the Lib directory in the installation directory. This is the V3.6 version, the latest version is V3.8.3, but the hack patch is not generic and will cause the boot to fail.

After the launch, the Holy Grail is like.

Charles has a conversation (session, not a session in HTTP) that can be understood as the tab in the browser, which is useful when you need to debug multiple site pages, and when you refresh the page, only the request is captured in the current session.

(Ps:ctrl+n create a new session,ctrl+w close the current session)

Charles's proxy server is ready to use (prompting Firefox to install the plugin), and if the request is not captured, clear the browser cache.

On the interface function

The toolbar contains most of Charles's features:

There are several functional comparison abstractions, which are explained in more detail later.

Right-click Request menu, Charles's right-click menu is much more powerful than fiddler.

Double-click the request into the list view, similar to fiddler, for easy viewing and filtering of requests.

Charles ' Filter Finder is great and fast:

Request details similar to fiddler, but a lot of intuitive:

The tool view is basically explained, and then we'll do something with Charles.

Local agents and remote agents

Charles's proxy server port is the same as Fiddler 8888, which is your native ip:8888.

Our goal is to have a compressed file proxy cost to the source file.

After clicking on "Map Local":

Index-min.js agent into Index.js, refresh the page to try.

Agent success, so easy!

Charles's tree view is better than Fiddler's list view, the request after several refreshes will be summed into the tree, more at a glance, with fiddler, a bit of obsessive-compulsive classmates, have to click Clear, there are wood ...

Charles is a support subdirectory agent Oh, very useful features: (using wildcards *)

Local address Select a subdirectory, no wildcard characters are required.

How to tell if the agent is successful?

Charles was more humane than fiddler.

Check whether the agent is successful, the most effort is to click the Refresh button on the toolbar to refresh a single request, if the agent is successful, Charles will go to the "Notes" interface log, such as Mapped to local file: C:\www\htdocs\gallery\uploader\1.5\build\index-min.js .

Remove Agent Configuration

Tip: All configuration switches are available through the tools setting on the toolbar (the second button on the bottom).

Remove the proxy configuration:

Tip: It is recommended to turn on no Caching and not cache requests.

Mobile Agent Capabilities

To debug a mobile or tablet page, we need to proxy the request to Charles on the PC side.

You must make sure that the same wireless network is connected to the mobile and PC terminals.

iOS is very simple to configure

(Borrow my colleague from the cold)

The server IP is set to the IP of the PC, and the port is set to 8888.

Then the mobile terminal can be refreshed and tried.

Agent for Android Machine

First of all, the Android machine must have root privileges, and then need to use the app to do, in the Android Market search proxydroid, Gray often good agent app.

Some browsers are self-equipped with proxy configuration features, such as Opera Mobile, input opera:config, but I tried the next no agent success, do not know whether it is a cell phone problem.

WP8 proxy settings are also simple, the phone is connected to WiFi and settings under Settings –wifi– long press the connected wifi– pop-up editing options.

Try a remote agent

Agent configuration

Charles supports HTTPS and sockets proxies, and also supports SSL, which is very comprehensive.

Network simulation function

Throttle function is very useful for the front end, can see the performance of the page in the low speed, so as to find the point of optimization.

Online environment usually some because of slow speed caused by the bug, in this machine can not reproduce, then very flying blind, if too remote trouble, recommend the use of throttle.

First configure the next throttle.

We want to see how the page behaves in a 3G environment:

(Charles's pre-configuration for China's network environment is not accurate, telecommunications, mobile, netcom speed and there are significant differences.) )

To parse the meaning of the last few configurations:

Bandwidth (bandwidth), utilistation (Percent utilization), round-trip (round-trip delay), MTU (BYTE) (the description of the MTU see Baidu Encyclopedia).

The Awesome breakpoint function

Another very useful feature of Charles is the artifact for developers and testers. Charles was able to break until the request was sent (tampering with the request) and after (tampering with the response).

Scenario: Ajax sends a request, we need to test the interface of various boundary conditions, such as error, timeout and other performance, Charles's Breakpoint + random tampering, very convenient test.

Upload.php is the upload interface we want to test, right-click "Breakpoints" to open the breakpoint.

Tip: Instead of working in the Web interface, you can send the same request again using the Repeat feature:

Breakpoint List View

You can specify a breakpoint "get" request or a "post" request.

Send requests repeatedly

The repeat function is especially useful for testing classmates, which can verify the robustness of the interface.

Repeat the value of the front end is no need to refresh the page, only need to repeat the request, such as verifying the success of the agent, modify the request after the execution and so on.

"Repeat" repeatedly sends a request.

"Repeat advances" can customize the number of repetitions and repetition intervals.

Capture Record control

There are too many requests to capture, and it's easy to interfere, and Charles can filter the capture records.

Then configure "Exclude":

Web interface

Charles has an interesting web interface:

Powerful is the ability to control whether remote access to this interface, you can also set the user name and password ... The bunker ...

Browser input http://control.charles/:

Charles has other interesting features waiting for everyone to dig, because less is used, here is no longer a statement.

HTTP Grab Kit Charlse use tutorial

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.