<?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: Pass a header paramter / value for each vector tiles request in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/pass-a-header-paramter-value-for-each-vector-tiles/m-p/1429279#M12686</link>
    <description>&lt;P&gt;So that's what I did. Handler seems to trigger correct url.&lt;BR /&gt;This is still my result:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[0:] Accessing https://myurl.com requires authorization. Set a ChallengeHandler to provide credentials. For more information see https://developers.arcgis.com/net/security-and-authentication/
[0:] ArcGIS Maps SDK: Load Error: ServiceFeatureTable
System.Net.Http.HttpRequestException
Response status code does not indicate success: 401 (Unauthorized).
[0:] ArcGIS Maps SDK: Load Error: FeatureLayer
System.Net.Http.HttpRequestException
Response status code does not indicate success: 401 (Unauthorized).&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 07:49:38 GMT</pubDate>
    <dc:creator>jm2024</dc:creator>
    <dc:date>2024-05-10T07:49:38Z</dc:date>
    <item>
      <title>Pass a header paramter / value for each vector tiles request</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/pass-a-header-paramter-value-for-each-vector-tiles/m-p/1416952#M12656</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am adding vector tiles support using your maps in MAUI app. What I can't pass through is that each request to our server requires additional header value with our token in order to get response.&lt;BR /&gt;&lt;BR /&gt;For that I was using different map provider and I had interceptor service that was adding for each call from my BE endpoint header as:&lt;BR /&gt;&lt;BR /&gt;request.Headers.Add(_tokenHeader, _token);&lt;BR /&gt;&lt;BR /&gt;Now I was thinking about using&lt;BR /&gt;&lt;BR /&gt;AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(ChallengeMethod);&lt;BR /&gt;but I am worried there's no option to setup it like that.&lt;BR /&gt;&lt;BR /&gt;Can you suggest solution or it's not possible to inject header into request?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 11:26:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/pass-a-header-paramter-value-for-each-vector-tiles/m-p/1416952#M12656</guid>
      <dc:creator>jm2024</dc:creator>
      <dc:date>2024-04-30T11:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a header paramter / value for each vector tiles request</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/pass-a-header-paramter-value-for-each-vector-tiles/m-p/1417080#M12658</link>
      <description>&lt;P&gt;You can use the ArcGISHttpClientHandler.HttpRequestBegin event to listen for and modify requests.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ArcGISHttpClientHandler.HttpRequestBegin += (sender, message) =&amp;gt;
{
    if (message.RequestUri.Host == "www.myhost.com")
    {
        message.Headers.Add("MyTokenHeader", "MyToken");
    }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 15:44:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/pass-a-header-paramter-value-for-each-vector-tiles/m-p/1417080#M12658</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-04-30T15:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a header paramter / value for each vector tiles request</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/pass-a-header-paramter-value-for-each-vector-tiles/m-p/1429279#M12686</link>
      <description>&lt;P&gt;So that's what I did. Handler seems to trigger correct url.&lt;BR /&gt;This is still my result:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[0:] Accessing https://myurl.com requires authorization. Set a ChallengeHandler to provide credentials. For more information see https://developers.arcgis.com/net/security-and-authentication/
[0:] ArcGIS Maps SDK: Load Error: ServiceFeatureTable
System.Net.Http.HttpRequestException
Response status code does not indicate success: 401 (Unauthorized).
[0:] ArcGIS Maps SDK: Load Error: FeatureLayer
System.Net.Http.HttpRequestException
Response status code does not indicate success: 401 (Unauthorized).&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 07:49:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/pass-a-header-paramter-value-for-each-vector-tiles/m-p/1429279#M12686</guid>
      <dc:creator>jm2024</dc:creator>
      <dc:date>2024-05-10T07:49:38Z</dc:date>
    </item>
  </channel>
</rss>

