MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / responseURL

Function responseURL

scripts/libs/fetch.js:279–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

277 var xhr = new XMLHttpRequest()
278
279 function responseURL() {
280 if ('responseURL' in xhr) {
281 return xhr.responseURL
282 }
283
284 // Avoid security warnings on getResponseHeader when not allowed by CORS
285 if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
286 return xhr.getResponseHeader('X-Request-URL')
287 }
288
289 return;
290 }
291
292 xhr.onload = function() {
293 var status = (xhr.status === 1223) ? 204 : xhr.status

Callers 1

fetch.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected