Guest User

Untitled

a guest
Jan 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Client clientInstance = Client.create();
  2. clientInstance.addFilter(new HTTPBasicAuthFilter("", ""));
  3. WebResource webResource =
  4. clientInstance.resource("http://hostname:9200/indexname/_search");
  5. ClientResponse response=webResource.entity(dsl).accept("application/json").get(ClientResponse.class);
  6. String result = response.getEntity(String.class);
Add Comment
Please, Sign In to add comment