|
8 | 8 |
|
9 | 9 | # Introducing Configurable HTTP Client |
10 | 10 |
|
11 | | -## What is a Configurable HTTP Client? |
12 | | - |
13 | 11 | The RAPID SDK is built on top of an OkHttpClient that is not open for you to configure and tune. Lately, we've come to |
14 | 12 | realize your need to tune and optimize the HTTP client to your needs. So in order to give developers using the RAPID SDK |
15 | 13 | more control over the underlying HTTP client of the SDK, we're introducing a new builder which you can use to pass your |
16 | 14 | own HTTP Client for the SDK to use internally. |
17 | 15 |
|
18 | | -Using this builder, you can build an HTTP client with you own configurations and pass it to the SDK, or even pass a |
| 16 | +Using this builder, you can build an HTTP client with your own configurations and pass it to the SDK, or even pass a |
19 | 17 | client you're already using in your application. |
20 | 18 |
|
21 | 19 | {% messageCard type="info" %} |
|
25 | 23 | This feature is available in the `rapid-sdk` v5.2.0 and later. |
26 | 24 | {% /messageCard %} |
27 | 25 |
|
28 | | -## Why use a Configurable HTTP Client? |
| 26 | +## Choosing between configuring an HTTP Client and using the default client |
29 | 27 |
|
30 | | -A configurable HTTP client will benefit you in the following ways: |
| 28 | +Using the default client provided by the SDK is the easiest way to get started with the SDK. However, configuring your |
| 29 | +own HTTP client will benefit you in the following ways: |
31 | 30 |
|
32 | 31 | - **Optimization:** Fine-tune the client for better performance, such as connection pooling, timeouts, and retries. |
33 | 32 | - **Integration:** Use an existing HTTP client that is already configured and tested within your application. |
34 | 33 |
|
| 34 | +So, if you're looking to optimize the SDK for better performance or integrate it with an existing HTTP client, configuring |
| 35 | +your own HTTP client is the way to go. |
| 36 | + |
35 | 37 | ## How to configure your HTTP client? |
36 | 38 |
|
37 | 39 | To configure your HTTP client, you need to create an instance of `OkHttpClient` and pass it to the `RapidClient` builder. |
|
0 commit comments