Browse Source

[DOC] Fix HttpHost constructor arguments (#21056)

Protocol is the last argument.
Oficial API doc: https://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpHost.html
Your own use here: https://github.com/elastic/elasticsearch/blob/7560101ec73331acb39a042bde6130e59e4bb630/client/rest/src/test/java/org/elasticsearch/client/RequestLoggerTests.java#L54
Lukáš Vlček 9 years ago
parent
commit
d88e6c62aa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      docs/java-rest/usage.asciidoc

+ 2 - 2
docs/java-rest/usage.asciidoc

@@ -51,8 +51,8 @@ https://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/Ht
 [source,java]
 --------------------------------------------------
 RestClient restClient = RestClient.builder(
-        new HttpHost("http", "localhost", 9200),
-        new HttpHost("http", "localhost", 9201)).build();
+        new HttpHost("localhost", 9200, "http"),
+        new HttpHost("localhost", 9201, "http")).build();
 --------------------------------------------------
 
 The `RestClient` class is thread-safe and ideally has the same lifecycle as