1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-08-03 12:50:02 +00:00

Allow registering makers specific to POST or GET requests.

This commit is contained in:
King_DuckZ 2017-05-23 19:18:21 +01:00
parent 014f18ec57
commit 27881ed0f0
7 changed files with 66 additions and 13 deletions

View file

@ -160,7 +160,10 @@ int main (int parArgc, char* parArgv[], char* parEnvp[]) {
resp_factory.register_maker("error.cgi", &make_response<ErrorResponse>);
resp_factory.register_jolly_maker(&make_response<PastieResponse>);
std::unique_ptr<Response> response = resp_factory.make_response(cgi_env->path_info());
std::unique_ptr<Response> response = resp_factory.make_response(
cgi_env->path_info(),
cgi_env->request_method()
);
response->send();
}
catch (const std::exception& e) {