Skip to content

Commit e43b9df

Browse files
committed
Add response headers size and decompressed content size
1 parent 60aec94 commit e43b9df

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
@@ -3781,15 +3781,31 @@ NetworkRequestData = {
37813781
headers: [ *NetworkHeader ],
37823782
cookies: [ *NetworkCookie ],
37833783
?body: text,
3784+
headersSize: uint,
37843785
bodySize: uint,
3785-
headersSize: uint
37863786
};
37873787
</pre>
37883788

37893789
The <code>RequestData</code> type represents an ongoing network request.
37903790

37913791
TODO: Body is actually bytes, not clear how to handle it as text
37923792

3793+
#### The network.ResponseContent type #### {#type-network-ResponseData}
3794+
3795+
[=Remote end definition=] and [=local end definition=]
3796+
3797+
<pre class="cddl local-cddl">
3798+
NetworkResponseContent = {
3799+
size: unit / null
3800+
};
3801+
</pre>
3802+
3803+
The <code>ResponseContent</code> type represents the decoded response to a
3804+
network request.
3805+
3806+
<! -- Not sure this is worthwhile if it only ends up with a single field, but it
3807+
would be natural to add a field here if we have a way to return the body -->
3808+
37933809
#### The network.ResponseData type #### {#type-network-ResponseData}
37943810

37953811
[=Remote end definition=] and [=local end definition=]
@@ -3803,11 +3819,16 @@ NetworkResponseData = {
38033819
headers: [ *NetworkHeader ],
38043820
cookies: [ *NetworkCookie ],
38053821
mimeType: text,
3822+
headersSize: uint / null,
3823+
bodySize: uint / null,
38063824
bytesReceived: uint,
3825+
content: NetworkResponseContent,
38073826
timings: NetworkFetchTimingInfo,
38083827
};
38093828
</pre>
38103829

3830+
The <code>RequestData</code> type represents the response to a netowrk request.
3831+
38113832
### Events ### {#module-network-events}
38123833

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

0 commit comments

Comments
 (0)