http.server -> http

Description

The HTTP web application specifications that the server will construct.

The configuration of each specified HTTP web application must have a location property (of type string). The location property corresponds to the path or set of paths which will will be handled by the specified HTTP web application.

Simple configuration

The http composite property does not contain any value properties.

Composite configuration

The http composite property can contain any conforming composite property.

A conforming composite property represents an HTTP web application, the configuration of which must contain the following simple properties.

Name Type Default value Description
location string The path or set of paths which will be handled by the web application.

Built-in web-apps

The following HTTP web applications are available from the Balau library.

Name Description
files Serving of static file GET requests from the file system.
email.sender Handles website contact POST requests and sends an email after mapping the contact request to an email body.
redirections Performs 301 or 302 redirection for the specified locations.
canned Serves a fixed response for each HTTP request method.
failing Returns 404 for POST, GET, and HEAD requests.

Custom web-apps

Custom HTTP web applications must be registered by calling the following function before the application injector is created.

			HttpWebApp::registerHttpWebApp<WebAppT>(name);