<?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: REST interface (POST) and CORS in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230041#M20799</link>
    <description>If a 1st service uses GET then it means it is a 'simple' CORS request. 
&lt;BR /&gt;If you have POST/PUT/DELETE then a browser will do a so-called preflight request first. You can add an OPTIONS flow handler to manage it. FYI a TESB JIRA exists to make this process smoother for the job designers&amp;nbsp;</description>
    <pubDate>Mon, 05 Sep 2016 14:42:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-05T14:42:32Z</dc:date>
    <item>
      <title>REST interface (POST) and CORS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230040#M20798</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I have implement different REST interfaces. One interface for receiving data from a database. For that I use following schema:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBTV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150076i9CF84648BF0A6770/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBTV.png" alt="0683p000009MBTV.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Under tRestResponse I set&amp;nbsp;Access-Control-Allow-Origin = *. That works fine.&amp;nbsp;&lt;BR /&gt;One interface I use for post data into in db. I use following schema:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBTa.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150459i4559DAEDA3A821F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBTa.png" alt="0683p000009MBTa.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Also under tRESTResponse I set Access-Control-Allow-Origin = *. &lt;STRONG&gt;But that not works&lt;/STRONG&gt;. Under angularJS I also activate&amp;nbsp;$http.defaults.headers.common = '*'; But in chrome/firefox I receive that error: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '&lt;A href="http://localhost:9000" target="_blank"&gt;http://localhost:9000&lt;/A&gt;' is therefore not allowed access.&lt;BR /&gt;&lt;BR /&gt;Greets Benjamin&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:24:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230040#M20798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: REST interface (POST) and CORS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230041#M20799</link>
      <description>If a 1st service uses GET then it means it is a 'simple' CORS request. 
&lt;BR /&gt;If you have POST/PUT/DELETE then a browser will do a so-called preflight request first. You can add an OPTIONS flow handler to manage it. FYI a TESB JIRA exists to make this process smoother for the job designers&amp;nbsp;</description>
      <pubDate>Mon, 05 Sep 2016 14:42:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230041#M20799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-05T14:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: REST interface (POST) and CORS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230042#M20800</link>
      <description>So I add OPTIONS flow for the same URI to an trestresponse and add&amp;nbsp;"Access-Control-Allow-Methods" right?</description>
      <pubDate>Mon, 05 Sep 2016 16:44:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230042#M20800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-05T16:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: REST interface (POST) and CORS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230043#M20801</link>
      <description>Yes please, add OPTIONS flow handler to tRESTRequest's URL Handler which will listen on the same URL where POST data will be sent to from a browser - the browser should issue a pre-flight OPTIONS request first - you may need to add few more headers to make it this pre-flight pass, see 
&lt;BR /&gt; 
&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS" rel="nofollow noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS&lt;/A&gt; 
&lt;BR /&gt;which is one of the best articles. 
&lt;BR /&gt;HTH, Sergey</description>
      <pubDate>Tue, 06 Sep 2016 09:50:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230043#M20801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-06T09:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: REST interface (POST) and CORS</title>
      <link>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230044#M20802</link>
      <description>&lt;DIV&gt; 
 &lt;FONT size="2"&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Hello, I had the same CORS issue when calling a Talend ESB REST Web Service, I solved it this way.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="WS Tuto 00.PNG" style="width: 545px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5to.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138939iFBA1AEBA135C5AEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5to.png" alt="0683p000009M5to.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt; 
&lt;/DIV&gt; 
&lt;UL&gt; 
 &lt;LI&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;we&lt;/SPAN&gt; &lt;SPAN&gt;have&lt;/SPAN&gt; &lt;SPAN&gt;an&lt;/SPAN&gt; &lt;SPAN&gt;Angular&lt;/SPAN&gt; &lt;SPAN&gt;6&lt;/SPAN&gt; &lt;SPAN&gt;app&lt;/SPAN&gt; &lt;SPAN&gt;running&lt;/SPAN&gt; &lt;SPAN&gt;at&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp;"http://localhost:4200"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;FONT size="2"&gt;a &lt;SPAN&gt;REST&lt;/SPAN&gt; &lt;SPAN&gt;API&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;POST&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;made&lt;/SPAN&gt; &lt;SPAN&gt;with&lt;/SPAN&gt; &lt;SPAN&gt;Talend&lt;/SPAN&gt; &lt;SPAN&gt;ESB&lt;/SPAN&gt; &lt;SPAN&gt;serving&lt;/SPAN&gt; &lt;SPAN&gt;at&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp;"&lt;A href="http://192.168.202.190:8090/sayHello/{name}&amp;quot;&amp;nbsp;" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;http://192.168.202.190:8090/sayHello/{name}"&amp;nbsp;&lt;/A&gt;&lt;/STRONG&gt;where&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;is&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt; &lt;SPAN&gt;dynamic&lt;/SPAN&gt; &lt;SPAN&gt;POST&lt;/SPAN&gt; &lt;SPAN&gt;param&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;DIV&gt; 
 &lt;FONT size="2"&gt;&lt;STRONG&gt;The Angular App running at http://localhost:4200 sends POST request that it preceded by a preflight OPTIONS request.&lt;/STRONG&gt;&lt;/FONT&gt; 
&lt;/DIV&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;DIV&gt; 
 &lt;FONT size="2"&gt;&lt;SPAN&gt;We&lt;/SPAN&gt; &lt;SPAN&gt;have&lt;/SPAN&gt; &lt;SPAN&gt;to&lt;/SPAN&gt; &lt;SPAN&gt;configure&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;the&lt;/SPAN&gt; &lt;SPAN&gt;tRESTRequest&lt;/SPAN&gt; &lt;SPAN&gt;both&lt;/SPAN&gt; &lt;SPAN&gt;HTTP&lt;/SPAN&gt; &lt;SPAN&gt;verbs&lt;/SPAN&gt; &lt;SPAN&gt;output&lt;/SPAN&gt; &lt;SPAN&gt;flows&lt;/SPAN&gt; &lt;SPAN&gt;namely&lt;/SPAN&gt; &lt;SPAN&gt;POST&lt;/SPAN&gt; &lt;SPAN&gt;and&lt;/SPAN&gt; &lt;SPAN&gt;OPTIONS&lt;/SPAN&gt; &lt;SPAN&gt;with&lt;/SPAN&gt; &lt;SPAN&gt;the&lt;/SPAN&gt; &lt;SPAN&gt;same&lt;/SPAN&gt; &lt;SPAN&gt;URL&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;http&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;//192.168.202.190:8090/sayHello/{name}).&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="WS Tuto 01.PNG" style="width: 772px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M64R.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129462i4BBF89963769B423/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M64R.png" alt="0683p000009M64R.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt; 
 &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; 
&lt;/DIV&gt; 
&lt;DIV&gt; 
 &lt;DIV&gt; 
  &lt;UL&gt; 
   &lt;LI&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Headers to add in the "Component/Advanced Settings" tab of tRESTResponse for tRESTRequest OPTIONS Output Flow :&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt; 
  &lt;/UL&gt; 
  &lt;DIV&gt; 
   &lt;FONT size="2"&gt;&lt;SPAN&gt;"Access-Control-Allow-Origin"&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;"*"&lt;/SPAN&gt;&lt;/FONT&gt; 
  &lt;/DIV&gt; 
  &lt;DIV&gt; 
   &lt;FONT size="2"&gt;&lt;SPAN&gt;"Access-Control-Allow-Methods"&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;"OPTIONS"&lt;/SPAN&gt;&lt;/FONT&gt; 
  &lt;/DIV&gt; 
  &lt;DIV&gt; 
   &lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;"Access-Control-Allow-Headers"&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;"Access-Control-Allow-Origin, Accept, Content-Type"&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="WS Tuto 02.PNG" style="width: 855px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M64W.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147602iBE732BC5D3AE8B78/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M64W.png" alt="0683p000009M64W.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt; 
   &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
  &lt;/DIV&gt; 
  &lt;UL&gt; 
   &lt;LI&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Headers to add in the "Component/Advanced Settings" tab of tRESTResponse for tRESTRequest POST Output Flow :&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt; 
  &lt;/UL&gt; 
  &lt;DIV&gt; 
   &lt;DIV&gt; 
    &lt;FONT size="2"&gt;&lt;SPAN&gt;"Access-Control-Allow-Origin"&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;"*"&lt;/SPAN&gt;&lt;/FONT&gt; 
   &lt;/DIV&gt; 
   &lt;DIV&gt; 
    &lt;FONT size="2"&gt;&lt;SPAN&gt;"Access-Control-Allow-Methods"&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;"POST"&lt;/SPAN&gt;&lt;/FONT&gt; 
   &lt;/DIV&gt; 
   &lt;DIV&gt; 
    &lt;FONT size="2"&gt;&lt;SPAN&gt;"Access-Control-Allow-Headers"&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;"Content-Type"&lt;/SPAN&gt;&lt;/FONT&gt; 
   &lt;/DIV&gt; 
  &lt;/DIV&gt; 
 &lt;/DIV&gt; 
 &lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="WS Tuto 03.PNG" style="width: 702px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M64b.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147902i415B08ED056076BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M64b.png" alt="0683p000009M64b.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;DIV&gt; 
  &lt;UL&gt; 
   &lt;LI&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;Headers to add in the options of the Angular&amp;nbsp;6 POST Method :&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt; 
  &lt;/UL&gt; 
  &lt;DIV&gt; 
   &lt;FONT size="2"&gt;&lt;SPAN&gt;'Content-Type'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'application/json'&lt;/SPAN&gt;&lt;/FONT&gt; 
  &lt;/DIV&gt; 
  &lt;DIV&gt; 
   &lt;FONT size="2"&gt;&lt;SPAN&gt;'Accept'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'application/json'&lt;/SPAN&gt;&lt;/FONT&gt; 
  &lt;/DIV&gt; 
  &lt;DIV&gt; 
   &lt;FONT size="2"&gt;&lt;SPAN&gt;'Access-Control-Allow-Origin'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'*'&lt;/SPAN&gt;&lt;/FONT&gt; 
  &lt;/DIV&gt; 
 &lt;/DIV&gt; 
 &lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="WS Tuto 04.PNG" style="width: 508px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M64g.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135105i6C57A11E2F47A3FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M64g.png" alt="0683p000009M64g.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
 &lt;DIV&gt; 
  &lt;DIV&gt;
    &amp;nbsp; 
  &lt;/DIV&gt; 
  &lt;DIV&gt; 
   &lt;SPAN&gt;That&lt;/SPAN&gt; 
   &lt;SPAN&gt;'s All you have to do to make it work fine !!&lt;/SPAN&gt; 
   &lt;SPAN&gt;!&lt;/SPAN&gt; 
  &lt;/DIV&gt; 
  &lt;DIV&gt; 
   &lt;SPAN&gt;It&lt;/SPAN&gt; 
   &lt;SPAN&gt;'s possible you get a CORB warning&lt;/SPAN&gt; 
   &lt;SPAN&gt;.&lt;/SPAN&gt; 
  &lt;/DIV&gt; 
 &lt;/DIV&gt; 
 &lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
 &lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt; 
&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jun 2019 16:38:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/REST-interface-POST-and-CORS/m-p/2230044#M20802</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-20T16:38:34Z</dc:date>
    </item>
  </channel>
</rss>

