vibe.d beta banner
get vibe.d
0.8.2

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

Module vibe.web.common

Contains common functionality for the REST and WEB interface generators.

Functions

NameDescription
adjustMethodStyle(name, style)Adjusts the naming convention for a given function name to the specified style.
contentType(data)UDA to defeine the ContentType for methods returning an InputStream or ubyte[]
headerParam(identifier, field)Declare that a parameter will be transmitted to the API through the headers.
method(data)User Defined Attribute interface to force specific HTTP method in REST interface for function in question. Usual URL generation rules are still applied so if there are any "get", "query" or similar prefixes, they are filtered out.
path(data)User Defined Attribute interface to force specific URL path n REST interface for function in question. Path attribute is relative though, not absolute.
rootPath(path)UDA to define root URL prefix for annotated REST interface. Empty path means deducing prefix from interface type name (see also rootPathFromName)
rootPathFromName()Convenience alias

Classes

NameDescription
RestExceptionRespresents a Rest error response

Enums

NameDescription
MethodStyleDetermines the naming convention of an identifier.

Templates

NameDescription
extractHTTPMethodAndNameUses given function symbol to determine which HTTP method and what URL path should be used to access it in REST API.
Authors

Sönke Ludwig, Михаил Страшун

Copyright

© 2012-2014 RejectedSoftware e.K.

License

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