Open Wolftein opened 2 years ago
I also had this issue and came across this
void handle_post(http_request request) {
request.extract_json().then([request](pplx::task<web::json::value> task) {
try {
auto body = task.get(); // Exception occurs
...
} catch (const std::exception& e) {
ucout << e.what() << std::endl; // Example: Line 1, Column 3 Syntax error: Malformed token
...
}
request.reply(status_codes::OK, U("OK"));
});
}
OS: Ubuntu 20.04.2 Compiler: GCC 9.4.0
Example