Http.received readonly property



The Http.received property gets a number, representing the byte count of data received from the server during last HTTP request.

Example

local net = require "net" local client = net.Http("http://download.thinkbroadband.com") local task = client:download("/10MB.zip") local last = 0 while not task.terminated do sleep() last = client.received-last if last > 0 then print("Received "..last.." bytes") end end