(init)
| 13604 | } |
| 13605 | const identityTransform = new TransformStream(); |
| 13606 | inputBody.stream.pipeThrough(identityTransform); |
| 13607 | finalBody = { |
| 13608 | source: inputBody.source, |
| 13609 | length: inputBody.length, |
| 13610 | stream: identityTransform.readable |
| 13611 | }; |
| 13612 | } |
| 13613 | this[kState].body = finalBody; |
| 13614 | } |
| 13615 | // Returns request’s HTTP method, which is "GET" by default. |
| 13616 | get method() { |
| 13617 | webidl.brandCheck(this, _Request); |
| 13618 | return this[kState].method; |
| 13619 | } |
| 13620 | // Returns the URL of request as a string. |
| 13621 | get url() { |
| 13622 | webidl.brandCheck(this, _Request); |
| 13623 | return URLSerializer(this[kState].url); |
| 13624 | } |
| 13625 | // Returns a Headers object consisting of the headers associated with request. |
| 13626 | // Note that headers added in the network layer by the user agent will not |
| 13627 | // be accounted for in this object, e.g., the "Host" header. |
| 13628 | get headers() { |
| 13629 | webidl.brandCheck(this, _Request); |
| 13630 | return this[kHeaders]; |
| 13631 | } |
| 13632 | // Returns the kind of resource requested by request, e.g., "document" |
| 13633 | // or "script". |
| 13634 | get destination() { |
| 13635 | webidl.brandCheck(this, _Request); |
| 13636 | return this[kState].destination; |
| 13637 | } |
| 13638 | // Returns the referrer of request. Its value can be a same-origin URL if |
| 13639 | // explicitly set in init, the empty string to indicate no referrer, and |
| 13640 | // "about:client" when defaulting to the global’s default. This is used |
| 13641 | // during fetching to determine the value of the `Referer` header of the |
| 13642 | // request being made. |
| 13643 | get referrer() { |
| 13644 | webidl.brandCheck(this, _Request); |
| 13645 | if (this[kState].referrer === "no-referrer") { |
| 13646 | return ""; |
| 13647 | } |
| 13648 | if (this[kState].referrer === "client") { |
| 13649 | return "about:client"; |
| 13650 | } |
| 13651 | return this[kState].referrer.toString(); |
no outgoing calls
no test coverage detected