vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Class HTTPServerSettings

Contains all settings for configuring a basic HTTP server.

class HTTPServerSettings ;

The defaults are sufficient for most normal uses.


thisConstructs a new settings object with default values.
thisConstructs a new settings object with a custom bind interface and/or port.


accessLogFilestringSpefifies the name of a file to which access log messages are appended.
accessLogFormatstringSpecifies the format used for the access log.
accessLoggerHTTPLoggerSpecifies a custom access logger instance.
accessLogToConsoleboolIf set, access log entries will be output to the console.
bindAddressesstring[]The interfaces on which the HTTP server is listening.
disableDistHostboolDisable support for VibeDist and instead start listening immediately.
hostNamestringDetermines the server host name.
keepAliveTimeoutcore.time.DurationMaximum time between two request on a keep-alive connection
maxRequestHeaderSizeulongMaximum number of transferred bytes for the request header. This includes the request line the url and all headers.
maxRequestSizeulongMaximum number of transferred bytes per request after which the connection is closed with an error
maxRequestTimecore.time.DurationTime of a request after which the connection is closed with an error; not supported yet
optionsHTTPServerOptionConfigures optional features of the HTTP server
portushortThe port on which the HTTP server is listening.
sessionStoreSessionStoreSession management is enabled if a session store instance is provided
tlsContextTLSContextIf set, a HTTPS server will be started instead of plain HTTP.
useCompressionIfPossibleboolResponds to "Accept-Encoding" by using compression if possible.
webSocketPingIntervalcore.time.DurationInterval between WebSocket ping frames.


dup[get]HTTPServerSettingsReturns a duplicate of the settings object.
errorPageHandler[get, set]void delegate(HTTPServerRequest, HTTPServerResponse, HTTPServerErrorInfo)Sets a custom handler for displaying error pages for HTTP errors
errorPageHandler[set]void delegate(HTTPServerRequest, HTTPServerResponse, HTTPServerErrorInfo)Scheduled for deprecation - use a @safe callback instead.

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


© 2012-2017 RejectedSoftware e.K.


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