(headers)
| 7583 | } |
| 7584 | |
| 7585 | function Headers(headers) { |
| 7586 | this.map = {} |
| 7587 | |
| 7588 | if (headers instanceof Headers) { |
| 7589 | headers.forEach(function(value, name) { |
| 7590 | this.append(name, value) |
| 7591 | }, this) |
| 7592 | } else if (Array.isArray(headers)) { |
| 7593 | headers.forEach(function(header) { |
| 7594 | this.append(header[0], header[1]) |
| 7595 | }, this) |
| 7596 | } else if (headers) { |
| 7597 | Object.getOwnPropertyNames(headers).forEach(function(name) { |
| 7598 | this.append(name, headers[name]) |
| 7599 | }, this) |
| 7600 | } |
| 7601 | } |
| 7602 | |
| 7603 | Headers.prototype.append = function(name, value) { |
| 7604 | name = normalizeName(name) |
nothing calls this directly
no outgoing calls
no test coverage detected