pegasus.lua icon indicating copy to clipboard operation
pegasus.lua copied to clipboard

Response:writeFile()

Open lingbl opened this issue 3 years ago • 0 comments

function Response:writeFile(file, contentType) self:contentType(contentType) self:statusCode(200) local value = file:read('*a') <<---- "file" is not string, but in readme, this is string file:close() self:write(value)

return self end

In readme: writeFile(string:file) It creates the body with the content of the file passed as parameter

lingbl avatar Sep 27 '21 06:09 lingbl