MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / parseHeaders

Function parseHeaders

libraries/p5.js:7864–7875  ·  view source on GitHub ↗
(rawHeaders)

Source from the content-addressed store, hash-verified

7862 }
7863
7864 function parseHeaders(rawHeaders) {
7865 var headers = new Headers()
7866 rawHeaders.split(/\r?\n/).forEach(function(line) {
7867 var parts = line.split(':')
7868 var key = parts.shift().trim()
7869 if (key) {
7870 var value = parts.join(':').trim()
7871 headers.append(key, value)
7872 }
7873 })
7874 return headers
7875 }
7876
7877 Body.call(Request.prototype)
7878

Callers 1

p5.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected