File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
docs/reference/transport/rest-client Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Here is how you can configure the dependency using maven as a dependency manager
29
29
30
30
Here is how you can configure the dependency using gradle as a dependency manager. Add the following to your ` build.gradle ` file:
31
31
32
- ``` groovy
32
+ ``` groovy subs=true
33
33
dependencies {
34
34
compile 'org.elasticsearch.client:elasticsearch-rest-client-sniffer:{{version}}'
35
35
}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Here is how you can configure the dependency using maven as a dependency manager
31
31
32
32
Here is how you can configure the dependency using gradle as a dependency manager. Add the following to your ` build.gradle ` file:
33
33
34
- ``` groovy
34
+ ``` groovy subs=true
35
35
dependencies {
36
36
compile 'org.elasticsearch.client:elasticsearch-rest-client:{{version}}'
37
37
}
Original file line number Diff line number Diff line change @@ -163,20 +163,17 @@ Cancellable cancellable = restClient.performRequestAsync(
163
163
new ResponseListener () {
164
164
@Override
165
165
public void onSuccess (Response response ) {
166
- < 1 >
166
+ // Process the returned response, in case it was
167
+ // ready before the request got cancelled
167
168
}
168
169
169
170
@Override
170
171
public void onFailure (Exception exception ) {
171
- < 2 >
172
+ // Handle the returned exception, which will most
173
+ // likely be a `CancellationException` as the request
174
+ // got cancelled
172
175
}
173
176
}
174
177
);
175
178
cancellable. cancel();
176
179
```
177
-
178
- 1 . Process the returned response, in case it was ready before the request got cancelled
179
- 2 . Handle the returned exception, which will most likely be a ` CancellationException ` as the request got cancelled
180
-
181
-
182
-
You can’t perform that action at this time.
0 commit comments