none
HttpMapTileDataSource.AdditionalRequestHeaders does not add to the request header RRS feed

  • Question

  • I'm adding request headers with the following code example, and I'm expecting to see the information I've added in the request header.
    When I follow and review the request header (Telerik Fiddler 4) I can not see the information I added.
    I don't know what's wrong with the code. Can you help me?
    Thank you in advance.


    private HttpMapTileDataSource _dataSource;
    public GmHttpTileDataSourceFactory()
    {
    _dataSource = new HttpMapTileDataSource("https://tile.openstreetmap.org/{zoomlevel}/{x}/{y}.png");           
    _dataSource.AdditionalRequestHeaders.Add("Accept-Language", "en");
    _dataSource.AdditionalRequestHeaders.Add("Key", "Value");
    _dataSource.AdditionalRequestHeaders.Add("blabla", "blabla");
    }


    HttpMapTileDataSource.AdditionalRequestHeaders does not add to the request header
    HttpMapTileDataSource.AdditionalRequestHeaders does not add to the request header
    I'm adding request headers with the following code example
    I'm adding request headers with the following code example
    I'm adding request headers with the following code example
    Thursday, August 8, 2019 5:37 PM

Answers

  • Hi Mustafa,

    Members of the Bing maps dev team have taken a look at your post and believe it should work but would need more details to dig further. Without that detail, they have the following suggestion "An easy workaround would be to use the CustomMapTileDataSource and make the request directly from user code where they can add any headers they want."

    Sincerely,

    IoTGirl 

    Monday, August 12, 2019 5:18 PM
    Owner

All replies

  • Hi Mustafa,

    Members of the Bing maps dev team have taken a look at your post and believe it should work but would need more details to dig further. Without that detail, they have the following suggestion "An easy workaround would be to use the CustomMapTileDataSource and make the request directly from user code where they can add any headers they want."

    Sincerely,

    IoTGirl 

    Monday, August 12, 2019 5:18 PM
    Owner
  • Thank you for your suggestion.
    I have already tried 'CustomMapTileDataSource'. 
    But I want to use 'HttpMapTileDataSource' cache capability, and I need to manage the request headers.
    I briefly summarize the problem.
    I can't see the request headers that I added to the HttpMapTileDataSource object with the AdditionalRequestHeaders method when I follow the request.
    How do I give more information about the problem? 
    What should I do ?
    Thank you very much for your interest.
    Tuesday, August 13, 2019 10:49 AM