Package com.couchbase.client.java.http
Class ReactiveCouchbaseHttpClient
java.lang.Object
com.couchbase.client.java.http.ReactiveCouchbaseHttpClient
A specialized HTTP client for making requests to Couchbase Server.
Get an instance by calling ReactiveCluster.httpClient().
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReactiveCouchbaseHttpClient(ReactorOps reactor, AsyncCouchbaseHttpClient async) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<HttpResponse> delete(HttpTarget target, HttpPath path) Returns a Mono that, when subscribed, issues a DELETE request with default options.reactor.core.publisher.Mono<HttpResponse> delete(HttpTarget target, HttpPath path, HttpDeleteOptions options) Returns a Mono that, when subscribed, issues a DELETE request with given options.reactor.core.publisher.Mono<HttpResponse> get(HttpTarget target, HttpPath path) Returns a Mono that, when subscribed, issues a GET request with default options (no query parameters).reactor.core.publisher.Mono<HttpResponse> get(HttpTarget target, HttpPath path, HttpGetOptions options) Returns a Mono that, when subscribed, issues a GET request with the given options.reactor.core.publisher.Mono<HttpResponse> patch(HttpTarget target, HttpPath path) Returns a Mono that, when subscribed, issues a PATCH request with no body and default options.reactor.core.publisher.Mono<HttpResponse> patch(HttpTarget target, HttpPath path, HttpPatchOptions options) Returns a Mono that, when subscribed, issues a PATCH request with the given options.reactor.core.publisher.Mono<HttpResponse> post(HttpTarget target, HttpPath path) Returns a Mono that, when subscribed, issues a POST request with no body and default options.reactor.core.publisher.Mono<HttpResponse> post(HttpTarget target, HttpPath path, HttpPostOptions options) Returns a Mono that, when subscribed, issues a POST request with the given options.reactor.core.publisher.Mono<HttpResponse> put(HttpTarget target, HttpPath path) Returns a Mono that, when subscribed, issues a PUT request with no body and default options.reactor.core.publisher.Mono<HttpResponse> put(HttpTarget target, HttpPath path, HttpPutOptions options) Returns a Mono that, when subscribed, issues a PUT request with the given options.
-
Constructor Details
-
ReactiveCouchbaseHttpClient
-
-
Method Details
-
get
Returns a Mono that, when subscribed, issues a GET request with default options (no query parameters).To specify query parameters, use the overload that takes
HttpGetOptionsor include the query string in the path. -
get
public reactor.core.publisher.Mono<HttpResponse> get(HttpTarget target, HttpPath path, HttpGetOptions options) Returns a Mono that, when subscribed, issues a GET request with the given options.Specify query parameters via the options:
httpClient.get(target, path, HttpGetOptions.httpGetOptions() .queryString(Map.of("foo", "bar"))); -
post
Returns a Mono that, when subscribed, issues a POST request with no body and default options.To specify a request body, use the overload that takes
HttpPostOptions. -
post
public reactor.core.publisher.Mono<HttpResponse> post(HttpTarget target, HttpPath path, HttpPostOptions options) Returns a Mono that, when subscribed, issues a POST request with the given options.Specify a request body via the options:
// form data httpClient.post(target, path, HttpPostOptions.httpPostOptions() .body(HttpBody.form(Map.of("foo", "bar"))); // JSON document httpClient.post(target, path, HttpPostOptions.httpPostOptions() .body(HttpBody.json("{}"))); -
put
Returns a Mono that, when subscribed, issues a PUT request with no body and default options.To specify a request body, use the overload that takes
HttpPutOptions. -
put
public reactor.core.publisher.Mono<HttpResponse> put(HttpTarget target, HttpPath path, HttpPutOptions options) Returns a Mono that, when subscribed, issues a PUT request with the given options.Specify a request body via the options:
// form data httpClient.put(target, path, HttpPutOptions.httpPutOptions() .body(HttpBody.form(Map.of("foo", "bar"))); // JSON document httpClient.put(target, path, HttpPutOptions.httpPutOptions() .body(HttpBody.json("{}"))); -
patch
public reactor.core.publisher.Mono<HttpResponse> patch(HttpTarget target, HttpPath path, HttpPatchOptions options) Returns a Mono that, when subscribed, issues a PATCH request with the given options.Specify a request body via the options:
// form data httpClient.patch(target, path, HttpPatchOptions.httpPatchOptions() .body(HttpBody.form(Map.of("foo", "bar"))); // JSON document httpClient.patch(target, path, HttpPatchOptions.httpPatchOptions() .body(HttpBody.json("{}"))); -
patch
Returns a Mono that, when subscribed, issues a PATCH request with no body and default options.To specify a request body, use the overload that takes
HttpPatchOptions. -
delete
Returns a Mono that, when subscribed, issues a DELETE request with default options. -
delete
public reactor.core.publisher.Mono<HttpResponse> delete(HttpTarget target, HttpPath path, HttpDeleteOptions options) Returns a Mono that, when subscribed, issues a DELETE request with given options.
-