AnsweredAssumed Answered

JSAPI4: Intercept requests to add custom headers

Question asked by kevinhaeni on Nov 6, 2017
Latest reply on Nov 27, 2018 by NSager-esristaff

Hi, in JSAPI 3.x, it seems that it was possible to intercept the HTTP requests to the ArcGIS Server in several ways, like for example:

 

esriRequest.setRequestPreCallback(callbackFunction)

- overriding the dojo.xhr function

 

But I cannot find a way to do this in JSAPI 4.x.

 

I need to be able to add a custom header field with every request because of some reverse proxy / authentication reason.

Outcomes