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
If we want to a consume DTO like this info->addConsumes<Object<MyDTO>>("application/x-www-form-urlencoded");
when we try to read DTO like this return request->readBodyToDtoAsync<Object<MyDTO>>(controller->getDefaultObjectMapper()).callbackTo(&MyClass::MyCallback);
There is a problem with the bodyDecoder and the callback is not called.
The text was updated successfully, but these errors were encountered:
when we try to read DTO like this
return request->readBodyToDtoAsync<Object>(controller->getDefaultObjectMapper()).callbackTo(&MyClass::MyCallback);
There is a problem with the bodyDecoder and the callback is not called.
That's because you are trying to make JSON mapper to read application/x-www-form-urlencoded
You have to read body to string first, and then parse that body on your own.
If we want to a consume DTO like this
info->addConsumes<Object<MyDTO>>("application/x-www-form-urlencoded");
when we try to read DTO like this
return request->readBodyToDtoAsync<Object<MyDTO>>(controller->getDefaultObjectMapper()).callbackTo(&MyClass::MyCallback);
There is a problem with the bodyDecoder and the callback is not called.
The text was updated successfully, but these errors were encountered: