lua-users home
lua-l archive

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



On Jun 11, 2008, at 6:57 PM, s.gardner wrote:

Attempt to call field 'http_get' (a nil value)

Assuming you are using LuaSocket [1], socket.http is what you are looking for:

local http = require( 'socket.http' )

local aResponse, aCode = http.request( aURL )

or

local aRequest = { method = 'HEAD', url = aLink, headers = { referer = aURL } }
local aResponse, aCode = http.request( aRequest )


[1] http://www.cs.princeton.edu/~diego/professional/luasocket