You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this section of code, when the post request body comes empty the application breaks. Is it the expected behavior ?
elseif (request.method == method_t::POST) {
try {
if (request.body.empty())
throw;
possible_prime = std::stoul(request.body);
} catch (...) {
throwstd::runtime_error(
"POST requests should have a path of 'is_prime' and a body with 'SOME_NUMBER'");
}
The text was updated successfully, but these errors were encountered:
i mean the program is just for testing really, to show how to write an example application using prime_server. indeed the correct response is http400 which is easily done but also not all that important
Yes, it's definitely understandable! :)
Since I was already working on the shortcircuiters PR and using prime_serverd as my go-to test binary, I fixed it by throwing a runtime_error exception in one of my most recent commits.
In this section of code, when the post request body comes empty the application breaks. Is it the expected behavior ?
The text was updated successfully, but these errors were encountered: