Is it posible to send HTTP POST/GET requests from lua scripts ?
 

Is it posible to send HTTP POST/GET requests from lua scripts ?

Started by Kanubach, 13 November, 2008, 15:32:14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kanubach

Hi.

I would like to run a POST or GET (HTTP protocol) in a script lua, and get back data from an ouside website.

something like:

content = HTTPGet("http://www.mysite.com/script.php?x=0&y=1")


Is it possible in lua ?

Thank's.

ATAG

Example:
http = require "socket.http"
result, statuscode, content = http.request("http://www.mysite.com/script.php?x=0&y=1")

More info: http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/http.html


SMF spam blocked by CleanTalk