Skip to content

Commit 87df10b

Browse files
committed
updated to latest oatpp Async API
1 parent 39dc90d commit 87df10b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/src/controller/MyController.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class MyController : public oatpp::web::server::api::ApiController {
7272

7373
Action act() override {
7474
/* return Action to start child coroutine to read body */
75-
return request->readBodyToStringAsync(this, &EchoStringBody::returnResponse);
75+
return request->readBodyToStringAsync().callbackTo(&EchoStringBody::returnResponse);
7676
}
7777

7878
Action returnResponse(const oatpp::String& body){
@@ -92,7 +92,7 @@ class MyController : public oatpp::web::server::api::ApiController {
9292
ENDPOINT_ASYNC_INIT(EchoDtoBody)
9393

9494
Action act() override {
95-
return request->readBodyToDtoAsync<MessageDto>(this, &EchoDtoBody::returnResponse, controller->getDefaultObjectMapper());
95+
return request->readBodyToDtoAsync<MessageDto>(controller->getDefaultObjectMapper()).callbackTo(&EchoDtoBody::returnResponse);
9696
}
9797

9898
Action returnResponse(const MessageDto::ObjectWrapper& body){

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy