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
2929
3030Here is how you can configure the dependency using gradle as a dependency manager. Add the following to your ` build.gradle ` file:
3131
32- ``` groovy
32+ ``` groovy subs=true
3333dependencies {
3434 compile 'org.elasticsearch.client:elasticsearch-rest-client-sniffer:{{version}}'
3535}
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
3131
3232Here is how you can configure the dependency using gradle as a dependency manager. Add the following to your ` build.gradle ` file:
3333
34- ``` groovy
34+ ``` groovy subs=true
3535dependencies {
3636 compile 'org.elasticsearch.client:elasticsearch-rest-client:{{version}}'
3737}
Original file line number Diff line number Diff line change @@ -163,20 +163,17 @@ Cancellable cancellable = restClient.performRequestAsync(
163163 new ResponseListener () {
164164 @Override
165165 public void onSuccess (Response response ) {
166- < 1 >
166+ // Process the returned response, in case it was
167+ // ready before the request got cancelled
167168 }
168169
169170 @Override
170171 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
172175 }
173176 }
174177);
175178cancellable. cancel();
176179```
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