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

Function headers

scripts/libs/fetch.js:232–242  ·  view source on GitHub ↗
(xhr)

Source from the content-addressed store, hash-verified

230 }
231
232 function headers(xhr) {
233 var head = new Headers()
234 var pairs = xhr.getAllResponseHeaders().trim().split('\n')
235 pairs.forEach(function(header) {
236 var split = header.trim().split(':')
237 var key = split.shift().trim()
238 var value = split.join(':').trim()
239 head.append(key, value)
240 })
241 return head
242 }
243
244 Body.call(Request.prototype)
245

Callers 1

fetch.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected