HTTP Requests
Sending a GET Request
-- Send a GET request to http://naver.com and receive data in res
Server.HttpGet('http://naver.com', function(res)
print(res) -- Prints the returned text from the webpage
end)Sending a POST Request
-- Create a table named t and insert the POST request data
t = {}
t.id = 1234
t.name = "Hello"
-- Send a request to http://naver.com and receive the data in res
Server.HttpGet('http://naver.com', t, function(res)
print(res) -- The returned text from the webpage is printed.
end)Receiving Data on the Web Server
Last updated