Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
govardhant85
Contributor
Contributor

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

Labels (2)
0 Replies