diff --git a/docs/reference/transport/rest-client/sniffer/maven_repository.md b/docs/reference/transport/rest-client/sniffer/maven_repository.md index d86caaddf..7fc23890d 100644 --- a/docs/reference/transport/rest-client/sniffer/maven_repository.md +++ b/docs/reference/transport/rest-client/sniffer/maven_repository.md @@ -29,7 +29,7 @@ Here is how you can configure the dependency using maven as a dependency manager Here is how you can configure the dependency using gradle as a dependency manager. Add the following to your `build.gradle` file: -```groovy +```groovy subs=true dependencies { compile 'org.elasticsearch.client:elasticsearch-rest-client-sniffer:{{version}}' } diff --git a/docs/reference/transport/rest-client/usage/maven.md b/docs/reference/transport/rest-client/usage/maven.md index df88bea06..0586e4a8e 100644 --- a/docs/reference/transport/rest-client/usage/maven.md +++ b/docs/reference/transport/rest-client/usage/maven.md @@ -31,7 +31,7 @@ Here is how you can configure the dependency using maven as a dependency manager Here is how you can configure the dependency using gradle as a dependency manager. Add the following to your `build.gradle` file: -```groovy +```groovy subs=true dependencies { compile 'org.elasticsearch.client:elasticsearch-rest-client:{{version}}' } diff --git a/docs/reference/transport/rest-client/usage/requests.md b/docs/reference/transport/rest-client/usage/requests.md index 5632259e5..2d43ba9f3 100644 --- a/docs/reference/transport/rest-client/usage/requests.md +++ b/docs/reference/transport/rest-client/usage/requests.md @@ -163,20 +163,17 @@ Cancellable cancellable = restClient.performRequestAsync( new ResponseListener() { @Override public void onSuccess(Response response) { - <1> + // Process the returned response, in case it was + // ready before the request got cancelled } @Override public void onFailure(Exception exception) { - <2> + // Handle the returned exception, which will most + // likely be a `CancellationException` as the request + // got cancelled } } ); cancellable.cancel(); ``` - -1. Process the returned response, in case it was ready before the request got cancelled -2. Handle the returned exception, which will most likely be a `CancellationException` as the request got cancelled - - -