Difference between revisions of "Http.request"
From ComputerCraft Wiki
(Add function layout + information) |
(Fixed example -- http://www.computercraft.info/forums2/index.php?/topic/3467-) |
||
Line 14: | Line 14: | ||
local event, url, sourceText = os.pullEvent()<br /> | local event, url, sourceText = os.pullEvent()<br /> | ||
if event == "http_success" then<br /> | if event == "http_success" then<br /> | ||
− | respondedText = | + | respondedText = sourceText.readAll()<br /> |
print(respondedText)<br /> | print(respondedText)<br /> | ||
requesting = false<br /> | requesting = false<br /> |
Revision as of 03:31, 17 September 2012
Function http.request | |
Sends a HTTP request to the website. Returns event "http_success" on success. | |
Syntax | http.request() |
Returns | event "http_success" on success. |
Part of | ComputerCraft |
API | http |
Examples
Example | |
Prints the code of a loading bar program if successful. | |
Code |
http.request("http://pastebin.com/raw.php?i=Tk19jv43") |