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


so, google chrome great 'copy curl' option under 'network' of chrome devtools. works great in command lines linux not in windows. apparently has single quotes error

protocol 'http not supported

in other words reading single quote. there simple way make formatable windows? tried replacing single quotes double quotes nothing happens @ 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, 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

it works expected if use cygwin

personally, use mintty terminal cygwin works great compared command prompt comes windows.

to create script in cygwin:

open cygwin terminal

  • type nano file.sh
  • paste (shift+insert) curl copied earlier, press control+o enter
  • type chmod +x file.sh
  • type bash file.sh run batch.

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -