Request
- class Request: HttpMessage
- static source(source)
Construct a request from a source function
- Parameters:
source (
function
) – (pat:string|number|nil):string|nil,nil|string- Returns:
request
- Return type:
Request or nil
- Returns:
error
- Return type:
nil or str
- static tcp_source(socket)
Create a new Request with a lua socket
- Parameters:
socket (
table
) – tcp socket- Returns:
request with the first line parsed
- Return type:
Request or nil
- Returns:
if not nil an error message
- Return type:
nil or str
- static udp_source(socket)
Create a new Request with a lua socket
- Parameters:
socket (
table
) – udp socket- Return type:
Request or nil
- Return type:
nil or str
- content_length()