How to inject custom request header to export method of ArcGISDynamicMapServiceLayer service through ESRI JavaScript API(3.43)?

610
1
05-25-2023 01:45 AM
HarshalKale
New Contributor

I am using Esri API Version 3.43.

We are trying to inject custom request header to ESRI JavaScript API request from Angular application and it is successfully adding into request header but it is unable to inject request header to export method URL of DynamicMapserviceLayer 

For below URL we can not able to inject custom request header

https://<<domainname>>/server/rest/services/clients/TestMap/MapServer/export?dpi=96&transparent=true...

For below URL we can able to inject custom request header

https://<<domainname>>/server/rest/services/clients/TestMap/MapServer?f=json&dpi=96&transparent=true... 

As I analysis from the code export method request is not originating from Angular code but from ArcGISDynamicMapServiceLayer Esri JS API.

Is there any way to inject custom request header to ArcGISDynamicMapServiceLayer  Esri API.

Any suggestion is welcome....

Thanks in advance.

Best Regards,

Harshal

 

 

 

 

0 Kudos
1 Reply
robertopepato_bizpoke
New Contributor III

There is some reference in the documentation about an esri request wrapper that maybe can help you here: https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions

0 Kudos