vibe.d beta banner
get vibe.d
0.7.31

Module vibe.http.server

A HTTP 1.1/1.0 server implementation.

Functions

NameDescription
createTestHTTPServerRequest(url, method, data)Creates a HTTPServerRequest suitable for writing unit tests.
createTestHTTPServerResponse(data_sink, session_store)Creates a HTTPServerResponse suitable for writing unit tests.
listenHTTP(settings, request_handler)Starts a HTTP server listening on the specified port.
render(res)Renders the given Diet template and makes all ALIASES available to the template.
setVibeDistHost(host, port)Sets a VibeDist host to register with.
staticRedirect(url, status)Provides a HTTP request handler that responds with a static redirection to the specified URL.
staticTemplate()Provides a HTTP request handler that responds with a static Diet template.

Interfaces

NameDescription
HTTPServerRequestHandlerInterface for class based request handlers
HTTPServerRequestHandlerSInterface for class based request handlers with scoped parameters

Classes

NameDescription
HTTPServerErrorInfoAggregates all information about an HTTP error status.
HTTPServerRequestRepresents a HTTP request as received by the server side.
HTTPServerResponseRepresents a HTTP response as sent from the server side.
HTTPServerSettingsContains all settings for configuring a basic HTTP server.

Structs

NameDescription
HTTPListenerRepresents the request listener for a specific listenHTTP call.

Enums

NameDescription
HTTPServerOptionSpecifies optional features of the HTTP server.
SessionOptionOptions altering how sessions are created.

Aliases

NameTypeDescription
HTTPServerErrorPageHandlervoid delegate(HTTPServerRequest, HTTPServerResponse, HTTPServerErrorInfo)Delegate type used for user defined error page generator callbacks.
HTTPServerRequestDelegatevoid delegate(HTTPServerRequest, HTTPServerResponse)Delegate based request handler
HTTPServerRequestDelegateSvoid delegate(scope HTTPServerRequest, scope HTTPServerResponse)Delegate based request handler with scoped parameters
HTTPServerRequestFunctionvoid function(HTTPServerRequest, HTTPServerResponse)Static function based request handler
HTTPServerRequestFunctionSvoid function(scope HTTPServerRequest, scope HTTPServerResponse)Static function based request handler with scoped parameters
Authors

Sönke Ludwig, Jan Krüger, Ilya Shipunov

Copyright

© 2012-2013 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.