Class ReactiveCouchbaseHttpClient

    • Method Detail

      • get

        public Mono<HttpResponse> get​(HttpTarget target,
                                      HttpPath path)
        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 HttpGetOptions or include the query string in the path.

      • get

        public 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

        public 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

        public Mono<HttpResponse> put​(HttpTarget target,
                                      HttpPath path)
        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 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, HttpPostOptions.httpPutOptions()
             .body(HttpBody.form(Map.of("foo", "bar")));
        
         // JSON document
         httpClient.put(target, path, HttpPostOptions.httpPutOptions()
             .body(HttpBody.json("{}")));