|http:make-response &key protocol protocol-major protocol-minor status-code reason-phrase headers stream-timeout stream-expiration stream-rate body||[Function]|
Make a HTTP response. The status-code is the integer HTTP response code, 200 for success etc, and the associated reason-phrase is a human readable string describing the status code. The headers is an alist of headers and an associated list of values.
The server protocol string to send with the response may be supplied to override the default in which case the protocol-major and protocol-minor number must also be supplied.
The stream-timeout and the stream-expiration time to use while sending the response may also be supplied. When nil the time is unlimited. The default is the keyword :default in which case the request defaults will be used when sending the response.
The stream-rate is the target rate in bytes per second at which the response will be transmitted. When nil the target rate is unlimited. The default is the keyword :default in which case the server default rate is used.
The body, if any, may be a byte vector or a string, or a list of vector chunks with each chunk being list of a vector and an optional start and end position. A string vector will be converted into bytes before sending the response. The body may also be the list '(:source <stream>) in which case the content is read from the binary stream, or the body may be a list of such source stream lists and vector chunks. When the body is the list '(:splice <file-descriptor>) the connection stream is spliced with the supplied file descriptor and data is passing through in each direction - this is included to support the HTTP CONNECT method.