I am getting below object by rejection.headers() function in responseerror object of interceptor but unable to get particular header value in angularjs code for example x-request-id value have to store in some variable but unable to do that can any one please suggest,
{pragma: "no-cache", date: "Thu, 06 Sep 2018 14:57:56 GMT", x-content-type-options: "nosniff", x-request-id: "VLCRpt3v", x-frame-options: "DENY", …} cache-control : "no-cache, no-store, max-age=0, must-revalidate" content-type : "application/json;charset=UTF-8" date : "Thu, 06 Sep 2018 14:57:56 GMT" expires : "0" pragma : "no-cache" referrer-policy : "same-origin" transfer-encoding : "chunked" x-content-type-options : "nosniff" x-frame-options : "DENY" x-request-id : "VLCRpt3v" x-xss-protection : "1; mode=block"
and trying below code in angularjs code : var head = rejection.headers(); var requestId = head.x-request-id