<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CURL Command with Cookie file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/CURL-Command-with-Cookie-file/m-p/2319920#M90113</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;curl -c cookies.txt -XPOST https://XXX.XXXXXXX.com/api/authenticate -H "Content-Type: application/json" --data "{"userId":"myuserid, "password":"mypassword", "appKey":''myappKey"}"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return the cookie file and I have to user this cookie file to call another URL to download the data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;curl -b cookies.txt -O 'https://downloadthefilefromthis.com/filename.xlsx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am using tFileFetch component it says 200 OK but the cookie file is opening with non-readable text in it. &lt;/P&gt;&lt;P&gt;(i am saving it in a cookie.txt file). the output file that saves has error as {"error":{"data":"?", "message":"Invalid Request", "code":"-32600"}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please suggest me how can I achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Govardhan &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jan 2021 18:33:27 GMT</pubDate>
    <dc:creator>govardhant85</dc:creator>
    <dc:date>2021-01-20T18:33:27Z</dc:date>
    <item>
      <title>CURL Command with Cookie file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CURL-Command-with-Cookie-file/m-p/2319920#M90113</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;curl -c cookies.txt -XPOST https://XXX.XXXXXXX.com/api/authenticate -H "Content-Type: application/json" --data "{"userId":"myuserid, "password":"mypassword", "appKey":''myappKey"}"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return the cookie file and I have to user this cookie file to call another URL to download the data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;curl -b cookies.txt -O 'https://downloadthefilefromthis.com/filename.xlsx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am using tFileFetch component it says 200 OK but the cookie file is opening with non-readable text in it. &lt;/P&gt;&lt;P&gt;(i am saving it in a cookie.txt file). the output file that saves has error as {"error":{"data":"?", "message":"Invalid Request", "code":"-32600"}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please suggest me how can I achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Govardhan &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 18:33:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CURL-Command-with-Cookie-file/m-p/2319920#M90113</guid>
      <dc:creator>govardhant85</dc:creator>
      <dc:date>2021-01-20T18:33:27Z</dc:date>
    </item>
  </channel>
</rss>

