Skip to content

Commit f0d7181

Browse files
committed
Update readme
1 parent 6991138 commit f0d7181

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ See more:
1010

1111
## About ApiClient
1212

13-
oatpp ```ApiClient``` is a mechanism which enables you to generate Web Api Clients in declarative manner.
14-
Under the hood it uses provided ```RequestExecutor``` to perform http requests. Thus you are abstracted from the low-level http-client library implementation and can substitute any other http-client library at any time with zero code changes.
15-
*Roughly you may treat oatpp ```ApiClient``` as Java Retrofit for C++.*
13+
oatpp `ApiClient` is a mechanism which enables you to generate Web Api Clients in declarative manner.
14+
Under the hood it uses provided `RequestExecutor` to perform http requests. Thus you are abstracted from the low-level http-client library implementation and can substitute any other http-client library at any time with zero code changes.
15+
*Roughly you may treat oatpp `ApiClient` as Java Retrofit for C++.*
1616

1717
In this example you can configure to use such RequestExecutors:
18+
1819
- [oatpp-curl](https://github.com/oatpp/oatpp-curl) - RequestExecutor for oatpp's ApiClient based on libcurl.
19-
- ```oatpp::web::client::HttpRequestExecutor``` - oatpp out-of-the-box provided RequestExecutor
20+
- `oatpp::web::client::HttpRequestExecutor` - oatpp out-of-the-box provided RequestExecutor
21+
22+
Please note: it is recommended to use native out-of-the-box `oatpp::web::client::HttpRequestExecutor`. It is better integrated
23+
with oatpp and supports additional features like connection pools, retries, streaming of large data, and custom transport substitution.
2024

2125
## Example overview
2226

src/App.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ void run(){
3535
auto objectMapper = oatpp::parser::json::mapping::ObjectMapper::createShared();
3636

3737
/* Create RequestExecutor which will execute ApiClient's requests */
38-
//auto requestExecutor = createOatppExecutor();
39-
auto requestExecutor = createCurlExecutor();
38+
auto requestExecutor = createOatppExecutor();
39+
//auto requestExecutor = createCurlExecutor();
4040

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

0 commit comments

Comments
 (0)