use page's headerForRequest with fetch and XHR

This commit is contained in:
Pierre Tachoire
2026-01-30 18:18:20 +01:00
parent 9d30cdfefc
commit 333f1e2c47
2 changed files with 2 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ pub fn init(input: Input, options: ?InitOpts, page: *Page) !js.Promise {
if (request._headers) |h| {
try h.populateHttpHeader(page.call_arena, &headers);
}
try page.requestCookie(.{}).headersForRequest(page.arena, request._url, &headers);
try page.headersForRequest(page.arena, request._url, &headers);
if (comptime IS_DEBUG) {
log.debug(.http, "fetch", .{ .url = request._url });