mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
Emits a http_request_done internal notification.
With networking enabled, CDP listens to this event and emits a `Network.loadingFinished` event. This is event is used by puppeteer to know that details about the response (i.e. the body) can be queries. Added dummy handling for the Network.getResponseBody message. Returns an empty body. Needed because we emit the loadingFinished event which signals to drivers that they can ask for the body.
This commit is contained in:
@@ -64,6 +64,7 @@ pub const Notification = struct {
|
||||
http_request_start: List = .{},
|
||||
http_request_intercept: List = .{},
|
||||
http_headers_done: List = .{},
|
||||
http_request_done: List = .{},
|
||||
notification_created: List = .{},
|
||||
};
|
||||
|
||||
@@ -76,6 +77,7 @@ pub const Notification = struct {
|
||||
http_request_start: *const RequestStart,
|
||||
http_request_intercept: *const RequestIntercept,
|
||||
http_headers_done: *const ResponseHeadersDone,
|
||||
http_request_done: *const RequestDone,
|
||||
notification_created: *Notification,
|
||||
};
|
||||
const EventType = std.meta.FieldEnum(Events);
|
||||
@@ -106,6 +108,10 @@ pub const Notification = struct {
|
||||
transfer: *Transfer,
|
||||
};
|
||||
|
||||
pub const RequestDone = struct {
|
||||
transfer: *Transfer,
|
||||
};
|
||||
|
||||
pub const RequestFail = struct {
|
||||
transfer: *Transfer,
|
||||
err: anyerror,
|
||||
|
||||
Reference in New Issue
Block a user