Update README.md

This commit is contained in:
Leonid Stryzhevskyi 2019-04-10 03:15:24 +03:00 committed by GitHub
parent 08ff2a566c
commit e891ed6dfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,9 +135,7 @@ ENDPOINT_ASYNC("POST", "demo/api_async/json", PostJSONAsync) {
ENDPOINT_ASYNC_INIT(PostJSONAsync)
Action act() override {
return request->readBodyToDtoAsync<MyDto>(this,
&PostJSONAsync::onBodyObtained,
controller->getDefaultObjectMapper());
return request->readBodyToDtoAsync<MyDto>(controller->getDefaultObjectMapper()).callbackTo(&PostJSONAsync::onBodyObtained);
}
Action onBodyObtained(const MyDto::ObjectWrapper& dto) {