Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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}}'
}
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/transport/rest-client/usage/maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}}'
}
Expand Down
13 changes: 5 additions & 8 deletions docs/reference/transport/rest-client/usage/requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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