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.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.
bodyParam(identifier, field) Declare that a parameter will be transmitted to the API through the body.
contentType(data) Attribute to define the content type for methods.
extractHTTPMethodAndName() Determines the HTTP method and path for a given function symbol.
headerParam(identifier, field) Declare that a parameter will be transmitted to the API through the headers.
method(data) Attribute to force a specific HTTP method for an interface method.
noRoute() Methods marked with this attribute will not be treated as web endpoints.
path(data) Attibute to force a specific URL path.
queryParam(identifier, field) Declare that a parameter will be transmitted to the API through the query string.
rootPathFromName() Convenience alias to generate a name from the interface's name.
viaBody(field) Declare that a parameter will be transmitted to the API through the body.
viaHeader(field) Declare that a parameter will be transmitted to the API through the headers.
viaQuery(field) Declare that a parameter will be transmitted to the API through the query string.

Classes

NameDescription
RestException Respresents a Rest error response

Structs

NameDescription
PathAttribute This struct contains the name of a route specified by the path function.
WebParamAttribute This struct contains a mapping between the name used by HTTP (field) and the parameter (identifier) name of the function.

Enums

NameDescription
MethodStyle Determines the naming convention of an identifier.
NestedNameStyle Speficies how D fields are mapped to form field names

Aliases

NameTypeDescription
resultSerializer ResultSerializer!(serialize,deserialize,content_type) UDA for using a custom serializer for the method return value.
serializationPolicy SerPolicy!Args
Authors

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

Copyright

© 2012-2017 Sönke Ludwig

License

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