mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Prepare global NetworkRuntime module
This commit is contained in:
@@ -34,6 +34,7 @@ pub const mcp = @import("mcp.zig");
|
||||
pub const build_config = @import("build_config");
|
||||
pub const crash_handler = @import("crash_handler.zig");
|
||||
|
||||
const HttpClient = @import("browser/HttpClient.zig");
|
||||
const IS_DEBUG = @import("builtin").mode == .Debug;
|
||||
|
||||
pub const FetchOpts = struct {
|
||||
@@ -43,7 +44,7 @@ pub const FetchOpts = struct {
|
||||
writer: ?*std.Io.Writer = null,
|
||||
};
|
||||
pub fn fetch(app: *App, url: [:0]const u8, opts: FetchOpts) !void {
|
||||
const http_client = try app.http.createClient(app.allocator);
|
||||
const http_client = try HttpClient.init(app.allocator, &app.network);
|
||||
defer http_client.deinit();
|
||||
|
||||
const notification = try Notification.init(app.allocator);
|
||||
|
||||
Reference in New Issue
Block a user