@@ -3850,15 +3850,31 @@ NetworkRequestData = {
3850
3850
headers: [ *NetworkHeader ] ,
3851
3851
cookies: [ *NetworkCookie ] ,
3852
3852
?body: text,
3853
+ headersSize: uint,
3853
3854
bodySize: uint,
3854
- headersSize: uint
3855
3855
};
3856
3856
</pre>
3857
3857
3858
3858
The <code> RequestData</code> type represents an ongoing network request.
3859
3859
3860
3860
TODO: Body is actually bytes, not clear how to handle it as text
3861
3861
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
+
3862
3878
#### The network.ResponseData type #### {#type-network-ResponseData}
3863
3879
3864
3880
[=Remote end definition=] and [=local end definition=]
@@ -3872,11 +3888,16 @@ NetworkResponseData = {
3872
3888
headers: [ *NetworkHeader ] ,
3873
3889
cookies: [ *NetworkCookie ] ,
3874
3890
mimeType: text,
3891
+ headersSize: uint / null,
3892
+ bodySize: uint / null,
3875
3893
bytesReceived: uint,
3894
+ content: NetworkResponseContent,
3876
3895
timings: NetworkFetchTimingInfo,
3877
3896
};
3878
3897
</pre>
3879
3898
3899
+ The <code> RequestData</code> type represents the response to a netowrk request.
3900
+
3880
3901
### Events ### {#module-network-events}
3881
3902
3882
3903
#### The network.beforeRequestSent Event #### {#event-network-beforeSendRequest}
0 commit comments