kasketis / netfox

A lightweight, one line setup, iOS / OSX network debugging library! 🦊
MIT License
3.65k stars 368 forks source link

[Bug] Curls with request body don't work in postman #242

Open PM74367 opened 2 years ago

PM74367 commented 2 years ago

Describe the bug Imported curls don't work in postman when request body is present

To Reproduce Import curl for request which contains some body Sample curl: curl "https://collector.github.com/github/collect" -X POST -H "Cache-Control: max-age=0" -H "Accept: /" -H "Origin: https://github.com" -H "Referer: https://github.com/kasketis/netfox" -H "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" -H "Content-Type: application/json" -d "{"body":"abc"}" Import curl in postman and try to hit, it don't work, if you go to body section of request, it shows invalid body(attached ss of body) If we change double quote in curl in data to single quote, it works fine

Expected behavior Imported curl should work properly without any modification

Screenshots/Video

Screenshot 2022-09-10 at 12 15 13

Enviroment: Reproducable on every environment I tried on Netfox version 1.21.0 Postman version 9.13.0

renanvs commented 1 year ago

I have the same problem. I need to remove the body to import to the Postman, and after that copy the body in Simple log to pthe Postman body textfield

rubensmachion commented 3 weeks ago

Hello @renanvs and @PM74367. I just opened this PR to fix this problem.

https://github.com/kasketis/netfox/pull/270