lua-users home
lua-l archive

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


On Fri, Jan 30, 2009 at 4:07 PM, Ignacio Burgueño <ignaciob@inconcertcc.com> wrote:
Maybe something along these lines:

require"luarocks.require"
local http = require "socket.http"

print(http.request{
 url = "" href="http://lua-users.org/wiki/FiltersSourcesAndSinks" target="_blank">http://lua-users.org/wiki/FiltersSourcesAndSinks",
 sink = function(chunk, err)
               if chunk then
                       print("got a chunk of length", #chunk)
                       -- process chunk and return nil when you don't want to process more chunks
               end
               return 1
 end
})

This worked perfectly. Thanks so much.
--
Regards,
Ryan