vibe.d beta banner
get vibe.d
0.10.1

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

Module vibe.web.web

Implements a declarative framework for building web interfaces.

This module contains the sister funtionality to the vibe.web.rest module. While the REST interface generator is meant for stateless machine-to-machine communication, this module aims at implementing user facing web services. Apart from that, both systems use the same declarative approach.

See registerWebInterface for an overview of how the system works.

Functions

NameDescription
errorDisplay() Attribute to customize how errors/exceptions are displayed.
header(name, value) Sets a response header.
language() Returns the agreed upon language.
nestedNameStyle(style) Determines how nested D fields/array entries are mapped to form field names. Note that this attribute only works if applied to the class.
redirect(url, status) Redirects to the given URL.
registerWebInterface(router, instance, settings) Registers a HTTP/web interface based on a class instance.
request() Returns the current request.
response() Returns the current response.
status(statusCode) Sets the response status code.
terminateSession() Terminates the currently active session (if any).
trWeb(text, context) Translates text based on the language of the current web request.

Classes

NameDescription
WebInterfaceSettings Encapsulates settings used to customize the generated web interface.

Structs

NameDescription
SessionVar Maps a web interface member variable to a session field.

Templates

NameDescription
render Renders a Diet template file to the current HTTP response.

Manifest constants

NameTypeDescription
isPublic
Authors

Sönke Ludwig

Copyright

© 2013-2016 Sönke Ludwig

License

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