ChuckerTeam / chucker

🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device)
Apache License 2.0
3.97k stars 351 forks source link

Escape quotes in curl share #1211

Closed madlymad closed 7 months ago

madlymad commented 7 months ago

:camera: Screenshots

Share the curl and paste it into postman Before my change you get that one, which result in an invalid json header. Screenshot 2024-04-10 at 16 35 20

After my change you get that one, where the json is valid Screenshot 2024-04-10 at 16 35 04

:page_facing_up: Context

In our project/server we have a header that contain a JSON formatted text and every time someone try to use the curl from chucker the output curl is not working and result to errors. Having a JSON formatted value in header may seem strange but its not against any RFC.

:pencil: Changes

:paperclip: Related PR

No relations

:no_entry_sign: Breaking

No breaking changes

:hammer_and_wrench: How to test

Ideally with a curl that will have a header with quotes "

:stopwatch: Next steps

No