vibe.d beta banner
get vibe.d
0.10.1

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

Function extractHTTPMethodAndName

Determines the HTTP method and path for a given function symbol.

auto extractHTTPMethodAndName(alias Func, bool indexSpecialCase)();

The final method and path are determined from the function name, as well as any @method and @path attributes that may be applied to it.

This function is designed for CTFE usage and will assert at run time.

Returns

A tuple of three elements is returned:

  • flag "was UDA used to override path"
  • HTTPMethod extracted
  • URL path extracted

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.