vibe.d beta banner
get vibe.d
0.8.1

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

Function path

User Defined Attribute interface to force specific URL path n REST interface for function in question. Path attribute is relative though, not absolute.

vibe.web.common.PathAttribute path (
  string data
);

Example

interface IAPI
{
	@path("info2") getInfo();
}

// ...

shared static this()
{
	registerRestInterface!IAPI(new URLRouter(), new API(), "/root/");
	// now IAPI.getInfo is tied to "GET /root/info2"
}
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.