<?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 Cookies from request in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/cookies-from-request/m-p/823547#M1990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an API that I want to access that stores the authentication information in a cookie.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can successfully make the initial login request, however the second request to add data&amp;nbsp;doesn't work as I can't access the cookies that were created from the initial request (or should be).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do the testing in Postman, but nothing happens if I take the http code and make a couple of NetworkRequests or even a function based on the html code from Postman.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read the docs and it looks like I need to access the&amp;nbsp;&lt;SPAN style="color: #242729; background-color: #eff0f1;"&gt;QNetworkCookieJar&lt;/SPAN&gt;&amp;nbsp;to get this done (which currently isn't available) unless there is some wise advice from the QML experts that could help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look forward to hearing from someone &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Jul 2019 10:17:05 GMT</pubDate>
    <dc:creator>GarethWalters2</dc:creator>
    <dc:date>2019-07-15T10:17:05Z</dc:date>
    <item>
      <title>Cookies from request</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/cookies-from-request/m-p/823547#M1990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an API that I want to access that stores the authentication information in a cookie.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can successfully make the initial login request, however the second request to add data&amp;nbsp;doesn't work as I can't access the cookies that were created from the initial request (or should be).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do the testing in Postman, but nothing happens if I take the http code and make a couple of NetworkRequests or even a function based on the html code from Postman.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read the docs and it looks like I need to access the&amp;nbsp;&lt;SPAN style="color: #242729; background-color: #eff0f1;"&gt;QNetworkCookieJar&lt;/SPAN&gt;&amp;nbsp;to get this done (which currently isn't available) unless there is some wise advice from the QML experts that could help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look forward to hearing from someone &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2019 10:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/cookies-from-request/m-p/823547#M1990</guid>
      <dc:creator>GarethWalters2</dc:creator>
      <dc:date>2019-07-15T10:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cookies from request</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/cookies-from-request/m-p/823548#M1991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cookie management should be automatic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the login attempt was done via a NetworkRequest, then, it would set the cookies for all subsequent NetworkRequest. So, any session cookies should be working automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whilst one shouldn't need to, you can read the cookie&amp;nbsp;header given to you from a server via the responseHeaders and feed them into subsequent NetworkRequest headers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2019 04:03:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/cookies-from-request/m-p/823548#M1991</guid>
      <dc:creator>StephenQuan1</dc:creator>
      <dc:date>2019-07-16T04:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cookies from request</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/cookies-from-request/m-p/823549#M1992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for writing and helping me solve this. the initial request created a key in the header called 'Set-Cookie' which does have the value I needed to carry on, however the subsequent requests required a value from that "Set-Cookie" to be added as its own key/value pair - Cookie.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I set that prior to sending request it all worked perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2019 04:01:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/cookies-from-request/m-p/823549#M1992</guid>
      <dc:creator>GarethWalters2</dc:creator>
      <dc:date>2019-08-29T04:01:29Z</dc:date>
    </item>
  </channel>
</rss>

