From ff754fc666b040bfaade5a6295186c809c990aec Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Mon, 12 Feb 2024 21:50:01 +0100 Subject: [PATCH] xhr: implement responseURL --- src/xhr/xhr.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xhr/xhr.zig b/src/xhr/xhr.zig index 7398360e..2ad43027 100644 --- a/src/xhr/xhr.zig +++ b/src/xhr/xhr.zig @@ -467,6 +467,11 @@ pub const XMLHttpRequest = struct { } } + // TODO retrieve the redirected url + pub fn get_responseURL(self: *XMLHttpRequest) ?[]const u8 { + return self.url; + } + pub fn get_responseXML(self: *XMLHttpRequest, alloc: std.mem.Allocator) !?Response { if (self.response_type != .Empty and self.response_type != .Document) { return DOMError.InvalidState;