<?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 Re: tFileFetch HTTP header in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310465#M81592</link>
    <description>I used shong's advice, and for me it works fine. 
&lt;BR /&gt;My auth scheme a little bit more complicated: 
&lt;BR /&gt;local PC -&amp;gt; NTLM Proxy auth -&amp;gt; HTTP Basic auth -&amp;gt; HTTP data</description>
    <pubDate>Wed, 06 Oct 2010 14:31:01 GMT</pubDate>
    <dc:creator>aeugen</dc:creator>
    <dc:date>2010-10-06T14:31:01Z</dc:date>
    <item>
      <title>tFileFetch HTTP header</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310461#M81588</link>
      <description>Hi,&lt;BR /&gt;I need to get information through an HTTP GET request.&lt;BR /&gt;To do so, I use a tFileFetch component.&lt;BR /&gt;But I need to put an 'Authorization' token into the HTTP header...&lt;BR /&gt;Is there any way to do this ?&lt;BR /&gt;Thanks a lot.</description>
      <pubDate>Sat, 16 Nov 2024 14:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310461#M81588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch HTTP header</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310462#M81589</link>
      <description>Hello
&lt;BR /&gt;On the 'Advanced settings' tab of tFileFetch, there is a 'need authentication' option.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 19 Mar 2009 13:49:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310462#M81589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-19T13:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch HTTP header</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310463#M81590</link>
      <description>Thanks for your answer.
&lt;BR /&gt;But the authentication mechanism in Talend deals with login/password.
&lt;BR /&gt;My 'Authorization' HTTP header data is a big string, not a user/password couple.
&lt;BR /&gt;It should looks like : Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== ... in the HTTP header...
&lt;BR /&gt;I've tried to put my string into each of those fields but it doesn't work...
&lt;BR /&gt;Is this authentication information will end into the 'Authorization' field of the HTTP header ?</description>
      <pubDate>Thu, 19 Mar 2009 14:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310463#M81590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-19T14:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch HTTP header</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310464#M81591</link>
      <description>I'm dealing with the exact same issue. Anybody resolve this? I need to get the Authorization variable into the Get header.</description>
      <pubDate>Wed, 14 Apr 2010 22:34:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310464#M81591</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-04-14T22:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch HTTP header</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310465#M81592</link>
      <description>I used shong's advice, and for me it works fine. 
&lt;BR /&gt;My auth scheme a little bit more complicated: 
&lt;BR /&gt;local PC -&amp;gt; NTLM Proxy auth -&amp;gt; HTTP Basic auth -&amp;gt; HTTP data</description>
      <pubDate>Wed, 06 Oct 2010 14:31:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310465#M81592</guid>
      <dc:creator>aeugen</dc:creator>
      <dc:date>2010-10-06T14:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch HTTP header</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310466#M81593</link>
      <description>Probably what you have is base64 encoded... so from your example the decode command is 
&lt;BR /&gt;$ echo QWxhZGRpbjpvcGVuIHNlc2FtZQ== | mmencode -u 
&lt;BR /&gt;Aladdin 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA5A.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143082iB236712184B767DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA5A.png" alt="0683p000009MA5A.png" /&gt;&lt;/span&gt;pen sesame 
&lt;BR /&gt;So you login name is Aladdin and your password is "open sesame" 
&lt;BR /&gt;Have fun.</description>
      <pubDate>Fri, 20 Jul 2012 08:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310466#M81593</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-07-20T08:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: tFileFetch HTTP header</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310467#M81594</link>
      <description>I had a heck of a time getting things to work how it was described here so instead I wrote some code in a tJava component and looks like: (hopefully someone else would find this helpful) 
&lt;BR /&gt; 
&lt;PRE&gt;//conn.getResponseCode() returns -1 when the making multiple calls in a loop so you need to make sure that the streams are closed and the connection is fully closed&lt;BR /&gt;System.setProperty("http.keepAlive", "false");&lt;BR /&gt;       &lt;BR /&gt;		java.net.URL url = new java.net.URL(context.wsdl_url);&lt;BR /&gt;		&lt;BR /&gt;		java.net.HttpURLConnection conn = (java.net.HttpURLConnection) url.openConnection();&lt;BR /&gt;		conn.setDoOutput(true);&lt;BR /&gt;		conn.setRequestMethod("PUT");//you can specify what type of request you want to do here.... PUT, GET, POST... etc..&lt;BR /&gt;		conn.setRequestProperty("Content-Type", "application/json");&lt;BR /&gt;	&lt;BR /&gt;		String username = context.username;&lt;BR /&gt;		String password = context.password;&lt;BR /&gt;		&lt;BR /&gt;		sun.misc.BASE64Encoder enc = new sun.misc.BASE64Encoder();&lt;BR /&gt;        String userpassword = username + ":" + password;&lt;BR /&gt;        String encodedAuthorization = enc.encode( userpassword.getBytes() );&lt;BR /&gt;        conn.setRequestProperty("Authorization", "Basic "+encodedAuthorization);&lt;BR /&gt; 		conn.setAllowUserInteraction(true);&lt;BR /&gt; 		&lt;BR /&gt; 		String input = "{\"order_note\": \"Order downloaded.\",\"email_note\":Something here}";//payload to send to the server...&lt;BR /&gt;		&lt;BR /&gt; 		&lt;BR /&gt;		java.io.OutputStream os = conn.getOutputStream();&lt;BR /&gt;		os.write(input.getBytes());&lt;BR /&gt;		os.flush();&lt;BR /&gt;		os.close();&lt;BR /&gt;		&lt;BR /&gt;		if (conn.getResponseCode() != java.net.HttpURLConnection.HTTP_NO_CONTENT) {&lt;BR /&gt;			context.log += "\r\n"+currentTS+" Client:"+context.cust_code+" Order update failed. "+conn.getResponseCode()+" and message: "+conn.getResponseMessage();&lt;BR /&gt;			throw new RuntimeException("Orders might have been downloaded but failed to update order status at store. Failed : HTTP error code : "&lt;BR /&gt;				+ conn.getResponseCode());&lt;BR /&gt;		}&lt;BR /&gt; 		&lt;BR /&gt; 	&lt;BR /&gt; 		&lt;BR /&gt;		java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(&lt;BR /&gt;				(conn.getInputStream())));&lt;BR /&gt; 		&lt;BR /&gt;		String output;&lt;BR /&gt;		System.out.println("Output from Server .... \n");&lt;BR /&gt;		&lt;BR /&gt;		while ((output = br.readLine()) != null) {&lt;BR /&gt;			System.out.println(output);&lt;BR /&gt;		}&lt;BR /&gt;		&lt;BR /&gt;		conn.getInputStream().close();//be sure to close the stream OR in the while loop above make sure you read ALL the contents from the stream BEFORE closing it&lt;BR /&gt; 		&lt;BR /&gt;		conn.disconnect();&lt;BR /&gt; 	System.out.println("disconnected...");&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jul 2012 19:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileFetch-HTTP-header/m-p/2310467#M81594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T19:23:14Z</dc:date>
    </item>
  </channel>
</rss>

