Further to this, if we could use the method “HEAD” on network.request that would allow us to get the redirect and manually handle it…the same as using LuaSockets:
r, c, h = http.request {method = “HEAD”,url = url}
if h.location ~= nil then
local newurl = h.location
end
I’d just use LuaSockets but it’s not asynchronous, so would love to see this built into your network capabilities.
Cheers,
Will [import]uid: 61273 topic_id: 10770 reply_id: 39263[/import]
Bump on this thread, can someone please confirm if this has indeed been added to the list of things to do? At the moment it’s impossible to determine if there’s a redirect on a URL or File, and since network.download doesn’t follow redirects it also never gets followed!
Cheers,
Will [import]uid: 61273 topic_id: 10770 reply_id: 46590[/import]