spring-webclient Questions

3

Solved

Currently my post and get requests are handled through WebClients which has a common connection and read timeout in Spring Boot. I have 5 different classes each requiring its own set of connection ...
Burlie asked 16/11, 2021 at 7:3

4

Solved

I was trying to set headers to my rest client but every time I have to write webclient.get().uri("blah-blah") .header("key1", "value1") .header("key2", "value2")... How can I set all headers ...

7

Solved

I've started using WebClient and I'm adding logging of request/response using filter method: WebClient.builder() .baseUrl(properties.getEndpoint()) .filter((request, next) -> { // logging re...
Knitting asked 19/7, 2019 at 8:37

2

Solved

I'm facing an issue with WebClient and reactor-extra. Indeed, I have the following method : public Employee getEmployee(String employeeId) { return webClient.get() .uri(FIND_EMPLOYEE_BY_ID_URL, ...

3

Solved

I have the following code public ClientResponse doGet(HttpServletRequest request, URI uri) { return webClient.get() .uri(uri.toASCIIString()) .headers(headers -> headers.putAll(processRequest...
Fernandofernas asked 25/9, 2020 at 9:57

3

Solved

I've just upgraded to Webflux 5.3.0, and noticed that WebClient.exchange() method is now deprecated (link) in favor of new methos .exchangeToMono() and .exchangeToFlux() I had this code: webClient ...
Lowman asked 2/11, 2020 at 17:59

3

Solved

I am working on several spring-boot applications which have the traditional pattern of thread-per-request. We are using Spring-boot-webflux to acquire WebClient to perform our RESTful integration b...

1

I am using webclient in springboot application to call a external restful webservice. getting this exception intermittently. javax.net.ssl.SSLException: SSLEngine closed already SSLEngine closed al...

1

Solved

A little background I would like to call service's APIs, while doing retries on 5xx errors. Also, I would like to get an access to every failed request (for logging purposes). Code getClient() .ge...
Lennalennard asked 11/4, 2022 at 11:46

1

I am receiving the following error in a Spring Boot application using WebFlux org.springframework.core.io.buffer.DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144 I tried s...
Singularity asked 11/9, 2020 at 16:14

2

Solved

I'm using Web-flux/Reactive and Webclient, running it on Tomcat and spring-boot. Everything works fine. I read a lot about it. The problem seems to be that whenever you use Webclient, you have to r...
Saraann asked 9/7, 2019 at 16:34

3

Solved

I am new to spring webclient and i have written a generic method which can be used to consume rest apis in my application: public <T> List<T> get(URI url, Class<T> responseType) {...
Shall asked 10/5, 2021 at 11:37

2

Solved

In a Spring Boot application, I'm using WebClient to invoke a POST request to a remote application. The method currently looks like this: // Class A public void sendNotification(String notification...
Singleton asked 19/1, 2022 at 21:29

3

Solved

I want to consume a couple of rest services. Before, I used RestTemplate, but now I want to know The main differences between Spring Boot FeignClient and WebClient. When should they be used?

2

I know sending a body with a GET request isn't the best idea but I'm trying to consume an existing API which requires it. Sending a body with POST is straight-forward: webClient.post() .uri("...
Acidulate asked 9/11, 2021 at 19:47

3

Solved

I am running a Spring Boot app that uses WebClient for both non-blocking and blocking HTTP requests. After the app has run for some time, all outgoing HTTP requests seem to get stuck. WebClient is ...
Brinkman asked 15/12, 2021 at 1:49

1

Solved

My Spring boot 2.5 application is a fairly standard web application that exposes some endpoints and calls other services. In the usual use cases, an external request comes in, and applies some busi...
Juneberry asked 8/11, 2021 at 14:58

2

I want to dynamically change scope for client registrations. I know how to set up registrations this way: spring: security: oauth2: client: registration: custom: client-id: clientId client-s...

1

For a long time, Spring has been recommending RestTemplate for sync http requests. However, nowadays the documentation says: NOTE: As of 5.0 this class is in maintenance mode, with only minor requ...
Roundy asked 9/9, 2021 at 6:9

1

I am running load of a microservice API, which involves calling other microservice API using Spring Reactive Webclient. I am using Postman runner tab to test this. Firstly, i run the load with 1500...
Martellato asked 3/8, 2021 at 17:31

1

Solved

I am trying to upgrade to spring security 5.5.1 on a WebClient call. I found out that the oauth2 clientId and secret are now URL encoded in AbstractWebClientReactiveOAuth2AccessTokenResponseClient,...

0

I had 579,000 pending messages in my ActiveMQ, and I needed to publish these messages to a REST API. While doing so I was hitting the REST API at the rate of 3000 hits/second asynchronously. After ...
Ringnecked asked 10/6, 2021 at 3:59

2

Solved

I'm trying to make WebClient return an Optional.empty() when I get a 404, not found, from the server. But instead I get a Optional with a User object with all properties set to null. What am I mis...
Vocation asked 18/5, 2020 at 10:57

2

Basically, I want to log a request/response informations in one log containing bodies/headers with a Spring WebClient. With Spring RestTemplate we can do it with a ClientHttpRequestInterceptor. I ...

3

I am getting the following error getting a response of a post method via WebClient(org.springframework.web.reactive.function.client) org.springframework.core.codec.DecodingException: JSON decoding ...
Cymoid asked 27/8, 2020 at 3:29

© 2022 - 2024 — McMap. All rights reserved.