(xhr)
| 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 |