pegasus.lua
pegasus.lua copied to clipboard
Response:writeFile()
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