artyom-beilis / cppcms

CppCMS Framework
Other
443 stars 107 forks source link

URL dispatcher mapping now also supports response/request mime type #68

Open cyborgsimon opened 4 years ago

cyborgsimon commented 4 years ago

example:

dispatcher().map("(PUT|POST)", "text/html", "application/x-www-form-urlencoded", "/res_7/(a(\\d+))/(a(\\d+))/(a(\\d+))", &disp::p_3,this,2,4,6);

This will e.g. map correctly with a request with:

More information / examples can be found in the code documentation (url_dispatcher.h) or the unit tests (url_mapper_test.cpp)