AnsweredAssumed Answered

request.interceptors mapimagelayer working

Question asked by nathanrees on Sep 28, 2018
Latest reply on Dec 10, 2018 by NSager-esristaff

The request headers aren't being sent on MapImageLayers.  but works with FeatureLayers

token = 'sometoken';
api = 'myproxyserver';
esriConfig.request.interceptors.push({
  urls: [`https://${api}v1/GIS/proxy`],
  before: (params) => {
    params.requestOptions.headers = {'Authorization': 'Bearer ' + token};
  },
  headers: {'Authorization': 'Bearer ' + token}
});

looks like it's not being sent with the fetchImage function within MapImageLayer.js ... 

Outcomes