(body)
| 366 | }; |
| 367 | |
| 368 | function decode(body) { |
| 369 | var form = new FormData(); |
| 370 | body |
| 371 | .trim() |
| 372 | .split("&") |
| 373 | .forEach(function (bytes) { |
| 374 | if (bytes) { |
| 375 | var split = bytes.split("="); |
| 376 | var name = split.shift().replace(/\+/g, " "); |
| 377 | var value = split.join("=").replace(/\+/g, " "); |
| 378 | form.append(decodeURIComponent(name), decodeURIComponent(value)); |
| 379 | } |
| 380 | }); |
| 381 | return form; |
| 382 | } |
| 383 | |
| 384 | function parseHeaders(rawHeaders) { |
| 385 | var headers = new Headers(); |