Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to rewrite a status code with Charles Proxy?

I'm using Charles Proxy to rewrite a response from an API for testing purpose.

If I set a breakpoint, I am allowed to completely rewrite the raw response as I wish.

However, if I want to automate it via the "Rewrite" tool, I'm stuck, it seems that you cannot modify the status code:

Rewrite Rule panel

Do you know if I'm missing something?

like image 939
Thomas Avatar asked Jan 16 '13 14:01

Thomas


People also ask

How do you rewrite a response in Charles?

Rewrite Tool ⌘ command + ⌥option + R - Modify requests and responses as they pass through Charles. Breakpoints Tool ⌘ command + ⇧ shift + K - Intercept and edit requests and responses before they are sent and received.

What is rewrite in Charles?

The Rewrite tool enables you to create rules that modify requests and responses as they pass through Charles. Rules such as adding or changing a header or search and replace some text in the response body.


1 Answers

An Update: Version 3.8 of Charles Proxy was just released, with the ability to rewrite the status. From the release notes:

  • Rewrite tool: allow rewriting of response status

This version's rewrite UI adds a new "Response Status" rule type:

enter image description here

like image 156
Marc Liyanage Avatar answered Sep 22 '22 19:09

Marc Liyanage