Skip to content

Commit

Permalink
Address code review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta committed May 23, 2023
1 parent 3cb2441 commit aa172bf
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ There are multiple low level transports which `OpenSearchClient` could be config
### Create a client using `RestClientTransport`

```java
//Initialize the client with SSL and TLS enabled
import org.apache.http.HttpHost;

final HttpHost[] hosts = new HttpHost[] {
new HttpHost("localhost", 9200, "http")
};

// Initialize the client with SSL and TLS enabled
final RestClient restClient = RestClient
.builder(hosts).
.build();
Expand All @@ -98,6 +104,12 @@ Upcoming OpenSearch `3.0.0` release brings HTTP/2 support and as such, the `Rest
### Create a client using `ApacheHttpClient5Transport`

```java
import org.apache.hc.core5.http.HttpHost;

final HttpHost[] hosts = new HttpHost[] {
new HttpHost("localhost", "http", 9200)
};

final OpenSearchTransport transport = ApacheHttpClient5TransportBuilder
.builder(hosts)
.setMapper(new JacksonJsonpMapper())
Expand Down

0 comments on commit aa172bf

Please sign in to comment.