handle redirects on asynchronous calls

This commit is contained in:
Karl Seguin
2025-03-19 17:33:09 +08:00
parent de160d9170
commit 2f362f2aa2
3 changed files with 280 additions and 122 deletions

View File

@@ -510,7 +510,7 @@ pub const XMLHttpRequest = struct {
try request.sendAsync(loop, self, .{});
}
pub fn onHttpResponse(self: *XMLHttpRequest, progress_: http.AsyncError!http.Progress) !void {
pub fn onHttpResponse(self: *XMLHttpRequest, progress_: anyerror!http.Progress) !void {
const progress = progress_ catch |err| {
self.onErr(err);
return err;