mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
http_headers_done_receiving
This commit is contained in:
@@ -63,7 +63,8 @@ pub const Notification = struct {
|
||||
http_request_fail: List = .{},
|
||||
http_request_start: List = .{},
|
||||
http_request_intercept: List = .{},
|
||||
http_request_complete: List = .{},
|
||||
http_header_received: List = .{},
|
||||
http_headers_done_receiving: List = .{},
|
||||
notification_created: List = .{},
|
||||
};
|
||||
|
||||
@@ -75,7 +76,8 @@ pub const Notification = struct {
|
||||
http_request_fail: *const RequestFail,
|
||||
http_request_start: *const RequestStart,
|
||||
http_request_intercept: *const RequestIntercept,
|
||||
http_request_complete: *const RequestComplete,
|
||||
http_header_received: *const ResponseHeader,
|
||||
http_headers_done_receiving: *const ResponseHeadersDone,
|
||||
notification_created: *Notification,
|
||||
};
|
||||
const EventType = std.meta.FieldEnum(Events);
|
||||
@@ -102,17 +104,21 @@ pub const Notification = struct {
|
||||
wait_for_interception: *bool,
|
||||
};
|
||||
|
||||
pub const ResponseHeader = struct {
|
||||
request_id: u64,
|
||||
status: u16,
|
||||
header: std.http.Header,
|
||||
};
|
||||
|
||||
pub const ResponseHeadersDone = struct {
|
||||
transfer: *Transfer,
|
||||
};
|
||||
|
||||
pub const RequestFail = struct {
|
||||
transfer: *Transfer,
|
||||
err: anyerror,
|
||||
};
|
||||
|
||||
pub const RequestComplete = struct {
|
||||
id: usize,
|
||||
url: *const std.Uri,
|
||||
status: u16,
|
||||
};
|
||||
|
||||
pub fn init(allocator: Allocator, parent: ?*Notification) !*Notification {
|
||||
// This is put on the heap because we want to raise a .notification_created
|
||||
// event, so that, something like Telemetry, can receive the
|
||||
|
||||
Reference in New Issue
Block a user