spring-webclient Questions

3

Solved

I need to implement following behavior: Make a REST post request If response returns with a status 429 Too many requests, retry up to 3 times with a delay of 1 second If the third retry fails or ...
Hutchinson asked 16/9, 2019 at 14:42

1

I'm working on a Spring Boot application that uses Spring WebFlux, and I'm trying to intercept WebClient requests and responses. Specifically, I need to capture both the headers and the request/res...

3

We're using org.springframework.web.reactive.function.client.WebClient with reactor.netty.http.client.HttpClient as part of Spring 5.1.9 to make requests using the exchange() method. The documentat...
Wrinkly asked 19/2, 2020 at 16:20

4

Following scenario: I have two Microservices A and B. Service A is a Bearer client that has an open api and receives requests from clients that have to be authorized by keycloak. Now I want to send...
Kroo asked 11/12, 2020 at 10:56

2

I am invoking to a service with the following code: WebClient.create().get() .uri("http://www.somehost.es/api/products/1319/?ws_key=DC63ZTBVVQLN9MHQPQ9UMTL2DSW55C63") .retrieve() .body...
Adriannaadrianne asked 8/11, 2020 at 11:12

0

I am encountering an issue in my Spring Boot application where I am using WebClient to make synchronous calls to a remote service. However, when I use the block() method to wait for the WebClient r...
Pseudohermaphroditism asked 5/4 at 11:25

2

Solved

I want to expose the metrics of a WebClient call to a downstream system from the service, metrics like count of request, min, max time for the response is needed. I want to know how I can write a ...
Anomalistic asked 30/10, 2019 at 19:59

2

I have this following code which uses WebClient to make HTTP calls. webClient.post() .uri("/users/track") .body(BodyInserters.fromObject(getUserTrackPayload(selection, customAttribute, partyId)...

6

Solved

My following WebClient is working fine with internet connection but not through our proxy connection. WebClient webClient = WebClient.builder() .baseUrl("https://targetsite.com") .build(); webC...
Tipi asked 4/11, 2019 at 7:58

2

Solved

The Spring reactive WebClient can be built with a base URL: import org.springframework.web.reactive.function.client.WebClient; ... @Bean public WebClient webClient(WebClient.Builder builder) { ret...
Canvasback asked 21/11, 2022 at 17:12

3

Solved

How many concurrent requests can I send if the remote service if blocking? Means: what is the maxConnection pool limit that spring uses internally when using WebClient? @Autowired private WebClien...
Molecule asked 27/8, 2019 at 11:29

1

Solved

I'm stuck trying to do simple error handling when calling a remote service. The service returns a Map. The behaviour I'm looking for is: HTTP 200 --> Return body (Map<String, String>). HTT...
Desrochers asked 25/12, 2019 at 0:48

2

Solved

Helllo. I am trying to use Spring webclient to send post requests and fill the body with an object. But I receive the following " 'fromObject(T)' is deprecate". What is the alternative th...
Cauca asked 30/8, 2021 at 9:12

7

Solved

i'd like to retry the request 3 times after waiting 10sec when response is 5xx. but i don't see a method that I can use. On object WebClient.builder() .baseUrl("...").build().post() .retrieve()....

8

Solved

Environment: Spring Boot 2.3.1, Java 11 I have tried out a few things already (also comparing with the sample-app by spring), but so far I have been unsuccessful in creating a WebClient that requir...
Plagio asked 22/7, 2020 at 7:36

1

I've implemented a web client based on the spring-boot-starter-webflux artifact. The code: // create client bean to use throughout services @Bean public WebClient geoserverWebClient() { // to not ...
Chengteh asked 17/5, 2023 at 14:51

2

I am trying to replace the existing client code with RestTemplate with a WebClient. For that reason, most of the calls need to be blocking, so that the main portion of the application does not need...
Eddaeddana asked 28/3, 2022 at 6:7

2

Solved

I'm using Spring Boot 3.0.4 with Java 17. The Spring WebClient documentation says to use the injected WebClient.Builder: Spring Boot creates and pre-configures a WebClient.Builder for you. It is s...
Lewallen asked 22/4, 2023 at 15:6

3

Solved

I have started using WebClient in my Spring boot project recently. Can somebody throw some light on the differences/usages between exchange and retrieve methods in WebClient. I understand that exch...

1

Solved

When I try to build my project, I get this error message: : Unsatisfied dependency expressed through method 'webClient' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBea...
Oratorio asked 12/4, 2023 at 9:0

2

Solved

Spring documentation states that we have to switch from RestTemplate to WebClient even if we want to execute Synchronous HTTP call. For now I have following code: Mono<ResponseEntity<PdRespo...
Bedard asked 7/11, 2019 at 14:30

3

Solved

Sorry if this was asked before, but I didn't find a matching question. I have an application that performs api calls to other services. I'm thinking of using WebClient over RestTemplate as it's adv...
Microclimatology asked 15/2, 2022 at 14:17

0

I using spring-boot-starter-parent:2.7.7 I have the below config of webclient to call soap web services @Bean fun webClientXml(): WebClient { val httpClient = HttpClient.create() .option(ChannelO...
Chefoo asked 31/12, 2022 at 11:9

3

Solved

I need to include a slash in an URL to access RabbitMQ API and I'm trying to fetch data using WebClient: WebClient.builder() .baseUrl("https://RABBIT_HOSTNAME/api/queues/%2F/QUEUE_NAME")...
Giselle asked 17/4, 2020 at 12:16

3

we have a server to retrieve a OAUTH token, and the oauth token is added to each request via WebClient.filter method e.g webClient .mutate() .filter((request, next) -> tokenProvider.getBearer...
Highbinder asked 8/6, 2018 at 1:5

© 2022 - 2024 — McMap. All rights reserved.