lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks, Alex.

Of course your command works, but we will still get an error in

http.get("http://lua.org")

because http is a nil value.

Regards,
Chien

2010/6/3 Alexander Altshuler <alt@kaluga.ru>
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Chien Nguyen
Sent: Thursday, June 03, 2010 11:25 AM
To: Lua list
>Subject: Retrieve content of an HTML web page
>I am trying to get the content of a web page. I tried  socket.http.get 
but was not successful.

>require('socket')   -- this is ok
...
>Please tell me how to solve this. Many thanks!

RTFM
local http = require("socket.http")

Alex