diff --git a/README.md b/README.md index 5d21e581..fbf5aed9 100644 --- a/README.md +++ b/README.md @@ -135,9 +135,7 @@ ENDPOINT_ASYNC("POST", "demo/api_async/json", PostJSONAsync) { ENDPOINT_ASYNC_INIT(PostJSONAsync) Action act() override { - return request->readBodyToDtoAsync(this, - &PostJSONAsync::onBodyObtained, - controller->getDefaultObjectMapper()); + return request->readBodyToDtoAsync(controller->getDefaultObjectMapper()).callbackTo(&PostJSONAsync::onBodyObtained); } Action onBodyObtained(const MyDto::ObjectWrapper& dto) {