Vikram Vikram - 7 months ago 56
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



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.