Vikram Vikram - 1 year ago 133
reST (reStructuredText) Question

curl -c command powershell - cookie file location

I'm using powershell curl commands to make REST API Calls. When I run the curl command with -c option,

curl https://sampleurl/api/sessions -i -X POST -H X-Api-Version:x.x -c mycookie -d email=$email -d password=$passwd

Where is the "mycookie" file stored in this case. For security purposes, I need to make sure it is safeguarded.

The documentation doesn't give much information here


Answer Source

curl's -c option saves (all known) cookies into the given file name. The file name is in your current directory, or if you use a path too, relative to the current directory.

You can of course also specify a full absolute path name to specify exactly where you want that cookie file to be saved.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download