File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ class MyController : public oatpp::web::server::api::ApiController {
78
78
79
79
Action act () override {
80
80
/* return Action to start child coroutine to read body */
81
- return request->readBodyToStringAsync (this , &EchoStringBody::returnResponse);
81
+ return request->readBodyToStringAsync (). callbackTo ( &EchoStringBody::returnResponse);
82
82
}
83
83
84
84
Action returnResponse (const oatpp::String& body){
@@ -98,7 +98,7 @@ class MyController : public oatpp::web::server::api::ApiController {
98
98
ENDPOINT_ASYNC_INIT (EchoDtoBody)
99
99
100
100
Action act () override {
101
- return request->readBodyToDtoAsync <MessageDto>(this , &EchoDtoBody::returnResponse, controller->getDefaultObjectMapper ());
101
+ return request->readBodyToDtoAsync <MessageDto>(controller->getDefaultObjectMapper ()). callbackTo (&EchoDtoBody::returnResponse );
102
102
}
103
103
104
104
Action returnResponse (const MessageDto::ObjectWrapper& body){
@@ -112,11 +112,11 @@ class MyController : public oatpp::web::server::api::ApiController {
112
112
ENDPOINT_ASYNC_INIT (TestApiGet)
113
113
114
114
Action act () override {
115
- return controller->myApiClient ->apiGetAsync (this , &TestApiGet::onResponse);
115
+ return controller->myApiClient ->apiGetAsync (). callbackTo ( &TestApiGet::onResponse);
116
116
}
117
117
118
118
Action onResponse (const std::shared_ptr<IncomingResponse>& response){
119
- return response->readBodyToStringAsync (this , &TestApiGet::returnResult);
119
+ return response->readBodyToStringAsync (). callbackTo ( &TestApiGet::returnResult);
120
120
}
121
121
122
122
Action returnResult (const oatpp::String& body) {
You can’t perform that action at this time.
0 commit comments