Posted 17 August 2012 - 03:06 AM
i am trying to make http.request() show a webpage i tried the code on the wiki for http.request to show the source of a page but for some reason it stops at sourceText = code.readAll()
i am using this code (off the wiki)
the error its saying is twitter:6: attempted to index ? nil
i tried to make it print the sourceText variable in os.pullEvent() instead of the responded text and that returned https://twitter.com/jeb_ 131b835
i am using this code (off the wiki)
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
the only thing i did was change the pastbin address to https://twitter.com/jeb_the error its saying is twitter:6: attempted to index ? nil
i tried to make it print the sourceText variable in os.pullEvent() instead of the responded text and that returned https://twitter.com/jeb_ 131b835