Skip to content

Commit 25ad069

Browse files
authored
Update docs for 1.10.1 change to API
1 parent 62b270d commit 25ad069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/usage/elasticsearch_container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ container.start();
1919
// Do whatever you want here.
2020
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
2121
credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("elastic", "changeme"));
22-
RestClient client = RestClient.builder(container.getHost())
22+
RestClient client = RestClient.builder(HttpHost.create(container.getHttpHostAddress()))
2323
.setHttpClientConfigCallback(httpClientBuilder -> httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider))
2424
.build();
2525
Response response = client.performRequest("GET", "/");

0 commit comments

Comments
 (0)