<?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: esriConfig.request.interceptors not appending token to /legend?f=json in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esriconfig-request-interceptors-not-appending/m-p/1217529#M78877</link>
    <description>&lt;P&gt;Thank you. So in this case I would pass the token in the query string of the request, I take it?&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2022 18:24:56 GMT</pubDate>
    <dc:creator>jasonwriter1</dc:creator>
    <dc:date>2022-09-29T18:24:56Z</dc:date>
    <item>
      <title>esriConfig.request.interceptors not appending token to /legend?f=json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esriconfig-request-interceptors-not-appending/m-p/1217512#M78875</link>
      <description>&lt;P&gt;I'm trying to use the esriConfig.request.interceptors to attach a token for a secured service which works until I try to fetch the legend info for the same url base.&lt;/P&gt;&lt;P&gt;esriConfig.request.interceptors.push({&lt;BR /&gt;&amp;nbsp; urls: "&lt;A href="https://gis.wgfd.wyo.gov/arcgis/rest/services/OneSteppe/OneSteppe_ExistingDisturbance_WyGISC/" target="_blank"&gt;https://gis.wgfd.wyo.gov/arcgis/rest/services/OneSteppe/OneSteppe_ExistingDisturbance_WyGISC/&lt;/A&gt;",&lt;BR /&gt;&amp;nbsp; before: function (params) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;params.requestOptions.query = params.requestOptions.query || {};&lt;BR /&gt;&amp;nbsp; &amp;nbsp;params.requestOptions.query.token = "theToken";&lt;BR /&gt;&amp;nbsp;},&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;The fetch I'm using:&lt;/P&gt;&lt;P&gt;fetch('&lt;A href="https://gis.wgfd.wyo.gov/arcgis/rest/services/OneSteppe/OneSteppe_ExistingDisturbance_WyGISC/MapServer/legend?f=json').then(function" target="_blank"&gt;https://gis.wgfd.wyo.gov/arcgis/rest/services/OneSteppe/OneSteppe_ExistingDisturbance_WyGISC/MapServer/legend?f=json').then(function&lt;/A&gt; (response) { return response.json() }).then(function (legend) {console.log(legend)})&lt;/P&gt;&lt;P&gt;error is 499 "Token Required".&lt;/P&gt;&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;&lt;P&gt;Jason.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 17:31:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esriconfig-request-interceptors-not-appending/m-p/1217512#M78875</guid>
      <dc:creator>jasonwriter1</dc:creator>
      <dc:date>2022-09-29T17:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: esriConfig.request.interceptors not appending token to /legend?f=json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esriconfig-request-interceptors-not-appending/m-p/1217517#M78876</link>
      <description>&lt;P&gt;The interceptors only work when using the request method of the JSAPI.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It uses fetch under the hood, but can't intercept native fetch requests.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 17:58:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esriconfig-request-interceptors-not-appending/m-p/1217517#M78876</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-09-29T17:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: esriConfig.request.interceptors not appending token to /legend?f=json</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esriconfig-request-interceptors-not-appending/m-p/1217529#M78877</link>
      <description>&lt;P&gt;Thank you. So in this case I would pass the token in the query string of the request, I take it?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 18:24:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esriconfig-request-interceptors-not-appending/m-p/1217529#M78877</guid>
      <dc:creator>jasonwriter1</dc:creator>
      <dc:date>2022-09-29T18:24:56Z</dc:date>
    </item>
  </channel>
</rss>

