예제 #1
0
파일: router.hpp 프로젝트: ColMelvin/pdns
 static void Any(const std::string& url, THandlerFunction handler, const std::string& name = "") { router.map("", url, handler, name); }; //<! Helper for mapping any method
예제 #2
0
파일: router.hpp 프로젝트: ColMelvin/pdns
 static void Delete(const std::string& url, THandlerFunction handler, const std::string& name = "") { router.map("DELETE", url, handler, name); }; //<! Helper for mapping DELETE
예제 #3
0
파일: router.hpp 프로젝트: ColMelvin/pdns
 static void Get(const std::string& url, THandlerFunction handler, const std::string& name = "") { router.map("GET", url, handler, name); }; //<! Helper for mapping GET
예제 #4
0
파일: router.hpp 프로젝트: ColMelvin/pdns
 static void Patch(const std::string& url, THandlerFunction handler, const std::string& name = "") { router.map("PATCH", url, handler, name); }; //<! Helper for mapping PATCH
예제 #5
0
파일: router.hpp 프로젝트: ColMelvin/pdns
/*! Map an URL.
If method is left empty, it will match any method. Name is also optional, but needed if you want to find it for making URLs 
*/
    static void Map(const std::string& method, const std::string& url, THandlerFunction handler, const std::string& name = "") { router.map(method, url, handler, name); };