Skip to content

Commit 87e5ef0

Browse files
committed
WIP response data
1 parent 38e7644 commit 87e5ef0

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
@@ -3891,7 +3891,6 @@ NetworkResponseData = {
38913891
status: uint,
38923892
statusText: text,
38933893
headers: [ *NetworkHeader ],
3894-
cookies: [ *NetworkCookie ],
38953894
mimeType: text,
38963895
headersSize: uint / null,
38973896
bodySize: uint / null,
@@ -3901,9 +3900,30 @@ NetworkResponseData = {
39013900
};
39023901
</pre>
39033902
3904-
The <code>RequestData</code> type represents the response to a netowrk request.
3903+
The <code>RequestData</code> type represents the response to a network request.
3904+
3905+
To <dfn>get the response data</div> given |response|:
3906+
3907+
1. Let |url| be the result of running the [=URL serializer=] with |response|'s
3908+
[=URL=].
3909+
3910+
1. // How to get the protocol actually used for the connection
3911+
3912+
1. Let |status| be |response|'s [=status=].
3913+
3914+
1. Let |status text| be |response|'s [=status message=].
3915+
3916+
1. Let |headers| be an empty list.
3917+
3918+
1. For each (|name|, |value|) in |response|'s [=headers list=]:
3919+
3920+
1. Append the result of [=get a Header=] with |name| and |value| to |headers|.
3921+
3922+
1. Let |body size| be |response|'s [=response body info=]'s [=encoded size=].
3923+
3924+
1. Let |content| be |response|'s [=response body info=]'s [=encoded size=].
39053925
3906-
### Events ### {#module-network-events}
3926+
### Events ### {#module-network-event}
39073927
39083928
#### The network.beforeRequestSent Event #### {#event-network-beforeSendRequest}
39093929
<dl>

0 commit comments

Comments
 (0)