<?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: Multiple interceptors arcgis 4.x in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130416#M75775</link>
    <description>&lt;P&gt;You need to specify the "urls" string so the interceptor knows which URL should be intercepted. the way you have it set up the "urls" is null or undefined, so the first one overwrites the second.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jan 2022 17:17:39 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2022-01-04T17:17:39Z</dc:date>
    <item>
      <title>Multiple interceptors arcgis 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130284#M75767</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Arcgis 4.x JSAPI&lt;/P&gt;&lt;P&gt;esriConfig.request.interceptors support multiple interceptors?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 14:02:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130284#M75767</guid>
      <dc:creator>Dvirus</dc:creator>
      <dc:date>2022-01-04T14:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple interceptors arcgis 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130333#M75769</link>
      <description>&lt;P&gt;It takes an array of interceptors, each can intercept a different URL, so yes, it can.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 15:29:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130333#M75769</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-01-04T15:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple interceptors arcgis 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130385#M75770</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is also what I thought but unfortunately it does not work..&lt;/P&gt;&lt;P&gt;Here is an pen example.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/Dvirus/pen/GRMdzLW?editors=1001" target="_blank"&gt;https://codepen.io/Dvirus/pen/GRMdzLW?editors=1001&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 16:36:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130385#M75770</guid>
      <dc:creator>Dvirus</dc:creator>
      <dc:date>2022-01-04T16:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple interceptors arcgis 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130416#M75775</link>
      <description>&lt;P&gt;You need to specify the "urls" string so the interceptor knows which URL should be intercepted. the way you have it set up the "urls" is null or undefined, so the first one overwrites the second.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 17:17:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130416#M75775</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-01-04T17:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple interceptors arcgis 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130457#M75777</link>
      <description>&lt;P&gt;Thanks you! it's working!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently Arcgis Experience Builder already add interceptor at file&lt;/P&gt;&lt;P&gt;client\dist\jimu-arcgis\index.js (it's built minified)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;(e=re.request.interceptors)||void 0===e||e.push({after:e=&amp;gt;{var t,i;(null===(t=null==e?void 0:e.url)||void 0===t?void 0:t.indexOf("/rest/info"))&amp;amp;&amp;amp;(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.owningSystemUrl)&amp;amp;&amp;amp;this.registOAuthInfo(e.data.owningSystemUrl)}}),&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;but they add interceptor without urls property&lt;/P&gt;&lt;P&gt;so even if I add urls&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; esriConfig.request.interceptors.push({
    urls: /FeatureServer\/\d+/,
    after: function (response) {     
      response.data.supportedQueryFormats = "JSON";
    }
  });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not intercept.&lt;/P&gt;&lt;P&gt;I tried to add urls to the first interceptor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt; esriConfig.request.interceptors[0].urls = /.*?/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt; esriConfig.request.interceptors[0].urls = /.*/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;also&amp;nbsp; not working&lt;/DIV&gt;&lt;DIV&gt;But&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;when tried&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;  esriConfig.request.interceptors[0].urls = /blalba.*/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;It's seems like if hit the first interceptor it's not continue to the second one.&lt;/DIV&gt;&lt;DIV&gt;Meanwhile I do&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;esriConfig.request.interceptors.push({
    urls: /FeatureServer\/\d+/,
    after: function (response) {     
      debugger;
      response.data.supportedQueryFormats = "JSON";
    }
  });
  
  esriConfig.request.interceptors.reverse();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Any suggestions?&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Jan 2022 18:26:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-interceptors-arcgis-4-x/m-p/1130457#M75777</guid>
      <dc:creator>Dvirus</dc:creator>
      <dc:date>2022-01-04T18:26:13Z</dc:date>
    </item>
  </channel>
</rss>

