Posted 06 August 2012 - 02:24 AM
I've been trying several time to make code for an auto-updater for a program, but each time it fails because it can't read the data to write to the file. I looked on the wiki for how to properly use the http api to do this, and i use the exact example on the http.request page, and it too got an error on writing to a file.
My question to everyone is, do custom pastebin functions/code still work? Even the example one from the wiki, does it work for you?
Here it is, if you're wondering. And yes, the link on pastebin does exist, but i can't write the file.
My question to everyone is, do custom pastebin functions/code still work? Even the example one from the wiki, does it work for you?
Here it is, if you're wondering. And yes, the link on pastebin does exist, but i can't write the file.
http.request("http://pastebin.com/raw.php?i=Tk19jv43")
requesting = true
while requesting do
local event, url, sourceText = os.pullEvent()
if event == "http_success" then
respondedText = code.readAll()
print(respondedText)
requesting = false
else
print("Server didn't respond.")
requesting = false
end
end