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

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


It works as expected if you use Cygwin

Personally, I use the mintty terminal from cygwin which works great compared to the command prompt that comes with windows.

To create a script in cygwin:

Open cygwin terminal

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


Are you sure it was Chrome?

Because Chrome, as of v35 least, uses "double-quotes" for it's Copy as cURL feature.

On the other hand, Firefox uses 'single-quotes'.

If you search/replace the single-quotes for double-quotes within the entire command, it should work as expected.

e.g. you need:

curl "http://www.test.com/login/" etc.


Spent some time trouble shooting this. What Chrome gave me didn't work in the Windows command line shell. However, if I did the "Copy as cURL" on my Mac and used that exact command on Windows it did work.