Module vibe.http.server
A HTTP 1.1/1.0 server implementation.
Functions
Name | Description |
---|---|
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. |
handleHTTPConnection(connection, context)
|
Treats an existing connection as an HTTP connection and processes incoming requests. |
listenHTTP(_settings, request_handler)
|
Starts a HTTP server listening on the specified port. |
listenHTTP(settings, request_handler)
|
Scheduled for deprecation - use a @safe callback instead.
|
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
Name | Description |
---|---|
HTTPServerRequestHandler
|
Interface for class based request handlers |
HTTPServerRequestHandlerS
|
Interface for class based request handlers with scoped parameters |
Classes
Name | Description |
---|---|
HTTPServerContext
|
Represents a single HTTP server port. |
HTTPServerErrorInfo
|
Aggregates all information about an HTTP error status. |
HTTPServerRequest
|
Represents a HTTP request as received by the server side. |
HTTPServerResponse
|
Represents a HTTP response as sent from the server side. |
HTTPServerSettings
|
Contains all settings for configuring a basic HTTP server. |
Structs
Name | Description |
---|---|
DefaultDietFilters
|
Provides the default css , javascript , markdown and htmlescape filters
|
HTTPListener
|
Represents the request listener for a specific listenHTTP call.
|
HTTPServerOption
|
Specifies optional features of the HTTP server. |
Enums
Name | Description |
---|---|
SessionOption
|
Options altering how sessions are created. |
Aliases
Name | Type | Description |
---|---|---|
HTTPServerErrorPageHandler
|
@safe void delegate(HTTPServerRequest, HTTPServerResponse, HTTPServerErrorInfo)
|
Delegate type used for user defined error page generator callbacks. |
HTTPServerRequestDelegate
|
@safe void delegate(HTTPServerRequest, HTTPServerResponse)
|
Delegate based request handler |
HTTPServerRequestDelegateS
|
@safe void delegate(scope HTTPServerRequest, HTTPServerResponse)
|
Delegate based request handler with scoped parameters |
HTTPServerRequestFunction
|
@safe void function(HTTPServerRequest, HTTPServerResponse)
|
Static function based request handler |
HTTPServerRequestFunctionS
|
@safe void function(scope HTTPServerRequest, HTTPServerResponse)
|
Static function based request handler with scoped parameters |
UncaughtException
|
Throwable
|