#include "crow.h"
#include <cassert>
#include <iostream>
#include <string>
#include <functional>
#include <sstream>
using namespace std;
using namespace placeholders;
int main()
{
crow::SimpleApp app;
CROW_ROUTE(app, "/patch")
.methods("PATCH"_method)
([](const crow::request& req) {
return "test";
});
auto port = 18080;
app.port(port).multithreaded().run();
}
It gives "invalid method" error on CROW_ROUTE. "PATCH" for operator""_method is not defined in common.h. I tried adding it in analogy with "POST" (add in , but it still doesn't work: error 404 on PATCH-request.
Isn't that code supposed to work?
It gives "invalid method" error on CROW_ROUTE. "PATCH" for operator""_method is not defined in common.h. I tried adding it in analogy with "POST" (add in , but it still doesn't work: error 404 on PATCH-request.
Looks like it can't parse PATCH here
But I still don't really understand what's going on here.