curlconverter / curlconverter

Transpile curl commands into Python, JavaScript and 27 other languages
https://curlconverter.com
MIT License
7.18k stars 871 forks source link

convert below curl command to requests #46

Closed kishore0709 closed 7 years ago

kishore0709 commented 7 years ago

Hi,

How to convert below curl command to requests in python.

'curl -d "cmd_typ=22&cmd_mod=2&host=somehostname&service=someservice&btnSubmit=Commit" username:password@nagiosserver.com/nagios/cgi-bin/cmd.cgi

Thanks

einstein95 commented 7 years ago

https://curl.trillworks.com/ works fine with the command you gave

kishore0709 commented 7 years ago

Thanks for your comment. I tried but its giving "unable to parse" error.

einstein95 commented 7 years ago

Remove the ' from before curl

kishore0709 commented 7 years ago

Awesome it worked for me. Thank you very much.

NickCarneiro commented 7 years ago

I've updated the error message to warn if the input does not start with "curl". Thanks, @einstein95