Posted 21 December 2015 - 07:43 AM
I'm working on a program that's meant to download a text file from the internet, but I'm running into errors when I try to work with redirects. I set up a URL to redirect to my main file, which has a long URL. This results in:
lua> content = http.get("snipped url").readAll()
lua:1: attempt to index ? (a nil value)
However, if I use the original URL, the code works fine. There seems to be a problem handling redirects. How would I get around this error?