Skip to content

Commit 8c28b39

Browse files
committed
WIP response data
1 parent 1f4f511 commit 8c28b39

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

index.bs

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3960,7 +3960,6 @@ NetworkResponseData = {
39603960
status: uint,
39613961
statusText: text,
39623962
headers: [ *NetworkHeader ],
3963-
cookies: [ *NetworkCookie ],
39643963
mimeType: text,
39653964
headersSize: uint / null,
39663965
bodySize: uint / null,
@@ -3970,9 +3969,30 @@ NetworkResponseData = {
39703969
};
39713970
</pre>
39723971
3973-
The <code>RequestData</code> type represents the response to a netowrk request.
3972+
The <code>RequestData</code> type represents the response to a network request.
3973+
3974+
To <dfn>get the response data</div> given |response|:
3975+
3976+
1. Let |url| be the result of running the [=URL serializer=] with |response|'s
3977+
[=URL=].
3978+
3979+
1. // How to get the protocol actually used for the connection
3980+
3981+
1. Let |status| be |response|'s [=status=].
3982+
3983+
1. Let |status text| be |response|'s [=status message=].
3984+
3985+
1. Let |headers| be an empty list.
3986+
3987+
1. For each (|name|, |value|) in |response|'s [=headers list=]:
3988+
3989+
1. Append the result of [=get a Header=] with |name| and |value| to |headers|.
3990+
3991+
1. Let |body size| be |response|'s [=response body info=]'s [=encoded size=].
3992+
3993+
1. Let |content| be |response|'s [=response body info=]'s [=encoded size=].
39743994
3975-
### Events ### {#module-network-events}
3995+
### Events ### {#module-network-event}
39763996
39773997
#### The network.beforeRequestSent Event #### {#event-network-beforeSendRequest}
39783998
<dl>

0 commit comments

Comments
 (0)