Skip to content

Commit 07c57f0

Browse files
committed
Add response headers size and decompressed content size
1 parent 88e8429 commit 07c57f0

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

index.bs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3850,15 +3850,31 @@ NetworkRequestData = {
38503850
headers: [ *NetworkHeader ],
38513851
cookies: [ *NetworkCookie ],
38523852
?body: text,
3853+
headersSize: uint,
38533854
bodySize: uint,
3854-
headersSize: uint
38553855
};
38563856
</pre>
38573857

38583858
The <code>RequestData</code> type represents an ongoing network request.
38593859

38603860
TODO: Body is actually bytes, not clear how to handle it as text
38613861

3862+
#### The network.ResponseContent type #### {#type-network-ResponseData}
3863+
3864+
[=Remote end definition=] and [=local end definition=]
3865+
3866+
<pre class="cddl local-cddl">
3867+
NetworkResponseContent = {
3868+
size: unit / null
3869+
};
3870+
</pre>
3871+
3872+
The <code>ResponseContent</code> type represents the decoded response to a
3873+
network request.
3874+
3875+
<! -- Not sure this is worthwhile if it only ends up with a single field, but it
3876+
would be natural to add a field here if we have a way to return the body -->
3877+
38623878
#### The network.ResponseData type #### {#type-network-ResponseData}
38633879

38643880
[=Remote end definition=] and [=local end definition=]
@@ -3872,11 +3888,16 @@ NetworkResponseData = {
38723888
headers: [ *NetworkHeader ],
38733889
cookies: [ *NetworkCookie ],
38743890
mimeType: text,
3891+
headersSize: uint / null,
3892+
bodySize: uint / null,
38753893
bytesReceived: uint,
3894+
content: NetworkResponseContent,
38763895
timings: NetworkFetchTimingInfo,
38773896
};
38783897
</pre>
38793898

3899+
The <code>RequestData</code> type represents the response to a netowrk request.
3900+
38803901
### Events ### {#module-network-events}
38813902

38823903
#### The network.beforeRequestSent Event #### {#event-network-beforeSendRequest}

0 commit comments

Comments
 (0)