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
it is not possible for me to check if the endpoint was called with an empty query parameter id, i.e. /ids?id=.
The problem is, that when the string to int32 conversion is performed like
bool success;
v_int32 number = oatpp::utils::conversion::strToInt32(oatpp::String(""), success);
the conversion of the empty string returns the number 0 and success is set to true. The reason is the comparison with the string length here. In the given example, this means that id would automatically default to 0. What should I do, if I would like to have a different default value?
The text was updated successfully, but these errors were encountered:
When having an endpoint like this
it is not possible for me to check if the endpoint was called with an empty query parameter
id
, i.e./ids?id=
.The problem is, that when the string to int32 conversion is performed like
the conversion of the empty string returns the number 0 and success is set to
true
. The reason is the comparison with the string length here. In the given example, this means that id would automatically default to 0. What should I do, if I would like to have a different default value?The text was updated successfully, but these errors were encountered: