Skip to content

Commit 287d91e

Browse files
committed
Increase oatpp version to 0.19.12
1 parent 0ac5f97 commit 287d91e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ add_library(${project_name}-lib
1515

1616
## link libs
1717

18-
find_package(oatpp 0.19.11 REQUIRED)
19-
find_package(oatpp-curl 0.19.11 REQUIRED)
18+
find_package(oatpp 0.19.12 REQUIRED)
19+
find_package(oatpp-curl 0.19.12 REQUIRED)
2020

2121
target_link_libraries(${project_name}-lib
2222
PUBLIC oatpp::oatpp

src/App.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121
#include <iostream>
2222

2323
std::shared_ptr<oatpp::web::client::RequestExecutor> createOatppExecutor() {
24+
OATPP_LOGD("App", "Using Oat++ native HttpRequestExecutor.");
2425
auto connectionProvider = oatpp::network::client::SimpleTCPConnectionProvider::createShared("httpbin.org", 80);
2526
return oatpp::web::client::HttpRequestExecutor::createShared(connectionProvider);
2627
}
2728

2829
std::shared_ptr<oatpp::web::client::RequestExecutor> createCurlExecutor() {
30+
OATPP_LOGD("App", "Using oatpp-curl RequestExecutor.");
2931
return oatpp::curl::RequestExecutor::createShared("http://httpbin.org/", false /* set verbose=true for dubug info */);
3032
}
3133

@@ -35,8 +37,8 @@ void run(){
3537
auto objectMapper = oatpp::parser::json::mapping::ObjectMapper::createShared();
3638

3739
/* Create RequestExecutor which will execute ApiClient's requests */
38-
auto requestExecutor = createOatppExecutor();
39-
//auto requestExecutor = createCurlExecutor();
40+
auto requestExecutor = createOatppExecutor(); // <-- Always use oatpp native executor where's possible.
41+
//auto requestExecutor = createCurlExecutor(); // <-- Curl request executor
4042

4143
/* DemoApiClient uses DemoRequestExecutor and json::mapping::ObjectMapper */
4244
/* ObjectMapper passed here is used for serialization of outgoing DTOs */

0 commit comments

Comments
 (0)