Method Protocols.HTTP.Server.Request()->response_and_finish()
- Method
response_and_finish
void
response_and_finish(mapping
m
,function
(:void
)|void
_log_cb
)- Description
Return a properly formatted response to the HTTP client
- Parameter
m
Contains elements for generating a response to the client.
"data"
:string
|array
(string
|object
)Data to be returned to the client. Can be an array of objects which are concatenated and sent to the client.
"file"
:object
File object, the contents of which will be returned to the client.
"error"
:int
HTTP error code
"size"
:int
Length of content to be returned. If file is provided, size bytes will be returned to client.
"modified"
:string
Contains optional modification date.
"type"
:string
Contains optional content-type
"extra_heads"
:mapping
Contains a mapping of additional headers to be returned to client.
"server"
:string
Contains the server identification header.