@@ -17,6 +17,10 @@ namespace NetworkDomainCallbackHandlers {
17
17
static const char * FrameId = " NSFrameIdentifier" ;
18
18
static const char * LoaderId = " NSLoaderIdentifier" ;
19
19
20
+ /*
21
+ * Fired when device is about to send HTTP request.
22
+ * @param args - JS object : { requestId, timestamp, type, response }
23
+ */
20
24
static void ResponseReceivedCallback (const v8::FunctionCallbackInfo<v8::Value>& args) {
21
25
try {
22
26
auto networkAgentInstance = V8NetworkAgentImpl::Instance;
@@ -90,6 +94,10 @@ static void ResponseReceivedCallback(const v8::FunctionCallbackInfo<v8::Value>&
90
94
}
91
95
}
92
96
97
+ /*
98
+ * Fired when HTTP response is available.
99
+ * @param args - JS object { requestId, url, request, timestamp, type }
100
+ */
93
101
static void RequestWillBeSentCallback (const v8::FunctionCallbackInfo<v8::Value>& args) {
94
102
try {
95
103
auto networkAgentInstance = V8NetworkAgentImpl::Instance;
@@ -164,6 +172,10 @@ static void RequestWillBeSentCallback(const v8::FunctionCallbackInfo<v8::Value>&
164
172
}
165
173
}
166
174
175
+ /*
176
+ * Called after response is received to save the response data for the provided requestId
177
+ * @param args - JS object { requestId, data, hasTextContent }
178
+ */
167
179
static void DataForRequestId (const v8::FunctionCallbackInfo<v8::Value>& args) {
168
180
try {
169
181
auto networkAgentInstance = V8NetworkAgentImpl::Instance;
@@ -229,6 +241,10 @@ static void DataForRequestId(const v8::FunctionCallbackInfo<v8::Value>& args) {
229
241
}
230
242
}
231
243
244
+ /*
245
+ * Fired when HTTP request has finished loading.
246
+ * @param args - JS object { requestId, timestamp }
247
+ */
232
248
static void LoadingFinishedCallback (const v8::FunctionCallbackInfo<v8::Value>& args) {
233
249
try {
234
250
auto networkAgentInstance = V8NetworkAgentImpl::Instance;
0 commit comments