Difference between revisions of "Http.get"

From ComputerCraft Wiki
Jump to: navigation, search
(["on success"])
(Add description)
Line 7: Line 7:
 
|addon=ComputerCraft
 
|addon=ComputerCraft
 
|examples=
 
|examples=
===Basic usage===
+
|desc=The response of the server on success or nil on failure.
 
{{Example
 
{{Example
 
|desc=Gets the content of example.com (in HTML)
 
|desc=Gets the content of example.com (in HTML)

Revision as of 02:55, 3 July 2012


Grid Redstone.png  Function http.get
The response of the server on success or nil on failure.
Grid paper.png  Example
Gets the content of example.com (in HTML)
Code
local sExample = http.get("http://example.com/")
write(sExample)
Output The source of example.com
Syntax http.get(string url)
Returns The response of the server on success or nil on failure.
Part of ComputerCraft
API HTTP