Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Charles: Export only the request body as a seperate JSON file [closed]

I use charles proxy tool to monitor the requests and response.

Although I can use the export feature of charles proxy tool to extract the complete file as a .chls file. As shown in the below picture,

enter image description here

That .chls file will have the URL, request headers, request body, response header, response body and many other details.

But what I need is only the request body to be saved as a .json file. Is there anyway that I can automate this process?

like image 920
Harish Talanki Avatar asked Sep 05 '25 03:09

Harish Talanki


1 Answers

Go to Charles > Proxy Tab > Enable the Web Interface:

enter image description here

After completing charles session you can launch http://control.charles/session/export-json url to get the JSON format of the request.

To automate this you can use curl command:

Runtime.getRuntime().exec("curl -o file.json http://control.charles/session/export-csv");

like image 64
Kiran Sk Avatar answered Sep 07 '25 23:09

Kiran Sk