innovationM
← Back to Blogs

iOS

Web Service Proxy with Charles

InnovationM Admin 25 Oct 2017 2 min read
Web Service Proxy with Charles

There are some scenarios where we can use Charles :

  1. Sometimes we need to change web service request parameters to check some scenarios in our App, For this we need to change these parameters in our App before sending request. So everytime we need to make changes in our App to test with different request params.
  2.  After request we get some response from server, but what if we want to make changes in response.
  3.  If we want to track request and response structures.

For all above scenarios we need web service tracking tool. There are many tools available, but we will discuss here abut Charles.

How it works!

After installing Charles on your machine, when you start it, it will not track any request – response by default. You need to enable proxy for your machine.

For Mac machine

Proxy -> Mac OS X Proxy

Now you will be able to see all request and response through your machine, But what if you want to track only few APIs, Then Filter comes in mind.

This is the most important feature in Charles, because most of the time we need to track only few APIs.

To use Filters : Proxy -> Breakpoints Settings

Now click on Add Button

After filling this form click on OK button, Port and Query field may be blank.

Note : Don’t forget to select request / response checkboxes to set breakpoints.

Now you all setup, only thing to enable breakpoints. For this you need to select

Proxy -> Start Recording

Now Charles will give you the option to change request before web service hit and after getting response from server, so you can change the response according to your need before providing it to your App.

Happy Reading!!!

About the Author

InnovationM Admin

Contributor at InnovationM.

LinkedIn

Transform Your Ideas with Expert Guidance

icon
15+ Years of Expertise

Delivering high-impact solutions with years of industry experience.

icon
100+ Satisfied Clients

Helping contact industry software experts to achieve their brand goals.

icon
250+ In-House Team Members

A skilled team ready to tackle projects of any scale.

Book a consultation call with our experts today