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.

Prototype

vibe.http.rest.OverridenPath 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 RejectedSoftware e.K.

License

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