diff --git a/src/browser/webapi/net/Fetch.zig b/src/browser/webapi/net/Fetch.zig index a66fb311..da191d79 100644 --- a/src/browser/webapi/net/Fetch.zig +++ b/src/browser/webapi/net/Fetch.zig @@ -117,6 +117,7 @@ fn httpHeaderDoneCallback(transfer: *Http.Transfer) !bool { } res._status = header.status; + res._status_text = std.http.Status.phrase(@enumFromInt(header.status)) orelse ""; res._url = try arena.dupeZ(u8, std.mem.span(header.url)); res._is_redirected = header.redirect_count > 0; diff --git a/src/browser/webapi/net/Response.zig b/src/browser/webapi/net/Response.zig index d4088c66..d8c67e53 100644 --- a/src/browser/webapi/net/Response.zig +++ b/src/browser/webapi/net/Response.zig @@ -95,10 +95,6 @@ pub fn getStatus(self: *const Response) u16 { } pub fn getStatusText(self: *const Response) []const u8 { - // @TODO - // This property is meant to actually capture the response status text, not - // just return the text representation of self._status. If we do, - // new Response(null, {status: 200}).statusText, we should get empty string. return self._status_text; }