Using 'Copy as cURL' from Chrome in windows command line

Posted by user2029890 on Stack Overflow See other posts from Stack Overflow or by user2029890
Published on 2013-08-16T04:40:16Z Indexed on 2014/05/29 21:28 UTC
Read the original article Hit count: 225

Filed under:
|
|
|

So, Google Chrome as this great 'copy as cURL' option under 'Network' of the Chrome DevTools. Works great in command lines for linux but not in windows. Apparently it has something to do with the single quotes as the error I get is

protocol 'http not supported

In other words its reading that single quote. Is there a simple way to make this formatable for windows? I tried replacing all the single quotes with double quotes but then nothing happens at all.

The command is: curl 'http://www.test.com/login/' -H 'Cookie: PHPSESSID=7dvb25maaaaaa9d7bbbbbc3f6' -H 'Origin: http://www.test.com' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Host: www.test.com' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8' -H 'Cache-Control: max-age=0' -H 'Referer: http://www.test.com/login/' -H 'Connection: keep-alive' --data 'loc=&login=user%40test.com&password=password&submit1=Sign+In' --compressed

Thank you

© Stack Overflow or respective owner

Related posts about Windows

Related posts about curl