+ logger.debug("POST uri = '{}{}''", baseUrl, uri);
+ return client.post() //
+ .uri(uri) //
+ .contentType(MediaType.APPLICATION_JSON) //
+ .bodyValue(body) //
+ .retrieve() //
+ .onStatus(HttpStatus::isError,
+ response -> Mono.error(new AsyncRestClientException(response.statusCode().toString()))) //
+ .bodyToMono(String.class) //
+ .defaultIfEmpty("");
+ }
+
+ public Mono<String> postWithAuthHeader(String uri, String body, String username, String password) {
+ logger.debug("POST (auth) uri = '{}{}''", baseUrl, uri);