handy_httpd.responses

Contains convenience functions for pre-formatted HTTP responses. Note that all functions here will flush the response, meaning that you do not have to manually flush the response in your handler.

Members

Functions

fileResponse
void fileResponse(HttpResponse response, string filename, string type)

Convenience method to send a file response to a request.

methodNotAllowed
void methodNotAllowed(HttpResponse response)

Convenience method to send a method not allowed response.

notFound
void notFound(HttpResponse response)
Undocumented in source. Be warned that the author may not have intended to support it.
okResponse
void okResponse(HttpResponse response)

Convenience method to prepare a simple 200 OK response.

okResponse
void okResponse(HttpResponse response, string bodyContent, string contentType)

Convenience method to prepare a 200 OK response with a body.

Meta