handle redirects on synchronous calls

This commit is contained in:
Karl Seguin
2025-03-18 19:39:22 +08:00
parent 314aea4e1e
commit 226c18cb56
4 changed files with 213 additions and 85 deletions

View File

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