@@ -3781,15 +3781,31 @@ NetworkRequestData = {
3781
3781
headers: [ *NetworkHeader ] ,
3782
3782
cookies: [ *NetworkCookie ] ,
3783
3783
?body: text,
3784
+ headersSize: uint,
3784
3785
bodySize: uint,
3785
- headersSize: uint
3786
3786
};
3787
3787
</pre>
3788
3788
3789
3789
The <code> RequestData</code> type represents an ongoing network request.
3790
3790
3791
3791
TODO: Body is actually bytes, not clear how to handle it as text
3792
3792
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
+
3793
3809
#### The network.ResponseData type #### {#type-network-ResponseData}
3794
3810
3795
3811
[=Remote end definition=] and [=local end definition=]
@@ -3803,11 +3819,16 @@ NetworkResponseData = {
3803
3819
headers: [ *NetworkHeader ] ,
3804
3820
cookies: [ *NetworkCookie ] ,
3805
3821
mimeType: text,
3822
+ headersSize: uint / null,
3823
+ bodySize: uint / null,
3806
3824
bytesReceived: uint,
3825
+ content: NetworkResponseContent,
3807
3826
timings: NetworkFetchTimingInfo,
3808
3827
};
3809
3828
</pre>
3810
3829
3830
+ The <code> RequestData</code> type represents the response to a netowrk request.
3831
+
3811
3832
### Events ### {#module-network-events}
3812
3833
3813
3834
#### The network.beforeRequestSent Event #### {#event-network-beforeSendRequest}
0 commit comments