Method Protocols.HTTP.Server.Request()->response_and_finish()
- Method
response_and_finish
voidresponse_and_finish(mappingm,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":objectFile object, the contents of which will be returned to the client.
"error":intHTTP error code
"size":intLength of content to be returned. If file is provided, size bytes will be returned to client.
"modified":stringContains optional modification date.
"type":stringContains optional content-type
"extra_heads":mappingContains a mapping of additional headers to be returned to client.
"server":stringContains the server identification header.