
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CURL Command with Cookie file
Hi,
I am trying to work on a requirement to download a file from a website which involves POSTing a url using Curl command and then storing a cookie file and call the other URL to use this cookie.
curl -c cookies.txt -XPOST https://XXX.XXXXXXX.com/api/authenticate -H "Content-Type: application/json" --data "{"userId":"myuserid, "password":"mypassword", "appKey":''myappKey"}"
This will return the cookie file and I have to user this cookie file to call another URL to download the data file.
curl -b cookies.txt -O 'https://downloadthefilefromthis.com/filename.xlsx
I am using tFileFetch component it says 200 OK but the cookie file is opening with non-readable text in it.
(i am saving it in a cookie.txt file). the output file that saves has error as {"error":{"data":"?", "message":"Invalid Request", "code":"-32600"}}
Can someone please suggest me how can I achieve this.
Thanks
Govardhan
