This commit is contained in:
Karl Seguin
2025-12-16 17:54:14 +08:00
parent 8a2641d213
commit 761b35b199
4 changed files with 3 additions and 5 deletions

View File

@@ -144,7 +144,6 @@ fn httpErrorCallback(ctx: *anyopaque, err: anyerror) void {
self._resolver.reject("fetch error", @errorName(err)); self._resolver.reject("fetch error", @errorName(err));
} }
const testing = @import("../../../testing.zig"); const testing = @import("../../../testing.zig");
test "WebApi: fetch" { test "WebApi: fetch" {
try testing.htmlRunner("net/fetch.html", .{}); try testing.htmlRunner("net/fetch.html", .{});

View File

@@ -59,7 +59,7 @@ const Credentials = enum {
const Cache = enum { const Cache = enum {
default, default,
@"no-store", @"no-store",
@"reload", reload,
@"no-cache", @"no-cache",
@"force-cache", @"force-cache",
@"only-if-cached", @"only-if-cached",

View File

@@ -113,7 +113,6 @@ pub fn isOK(self: *const Response) bool {
return self._status >= 200 and self._status <= 299; return self._status >= 200 and self._status <= 299;
} }
pub fn getText(self: *const Response, page: *Page) !js.Promise { pub fn getText(self: *const Response, page: *Page) !js.Promise {
const body = self._body orelse ""; const body = self._body orelse "";
return page.js.resolvePromise(body); return page.js.resolvePromise(body);