[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: crawling the web
- From: Petite Abeille <petite_abeille@...>
- Date: Wed, 11 Jun 2008 19:32:47 +0200
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