|
On 22 January 2015 at 07:29, Gordon Madarm <gmadarm@gmail.com> wrote:This is an example of how you'd create the table for request_pipeline:-- Assumes that file_with_paths.txt contains one path on each linelocal request = {} -- The request table to pass to httpc:request_pipelinelocal currentKey = 0 -- The most recent key an inner params table was stored atfor line in io.lines("file_with_paths.txt") docurrentKey = currentKey + 1 -- Increment currentKeyrequest[currentKey] = { path = line } -- Store a params table at currentKeyendhttpc:request_pipeline(request) -- Make the request