Questions tagged [spring-webclient]

WebClient makes it possible to perform reactive non-blocking HTTP requests in Spring applications. Use this tag for any questions involving its usage.

992 questions
0
votes
0 answers

Use WebClient to fetch a list of devices (one by one)

I have a list of 5000 network devices that I need to retrieve data from an online service. The service accepts only one device each time. I have created the following API to handle one device but I am not sure what will be the right way the fetch…
angus
  • 3,210
  • 10
  • 41
  • 71
0
votes
1 answer

WebLogic 10.3.4 wildcard certificate import

I have a local environment with WebLogic 10.3.4 and and .ear app deployed on it. This app must communicate with external services via REST APIs. These external services are exposed in https and use wildcard certificates. I receive the following…
vsam490
  • 59
  • 1
  • 11
0
votes
2 answers

how to convert Flux to ArrayList

In my spring-boot springboot service class, I have created the following code which is not working as desired: Service class: Flux mWorkspace = webClient.get().uri(WORKSPACEID) .retrieve().bodyToFlux(Workspace.class); ArrayList
groot
  • 57
  • 3
  • 12
0
votes
1 answer

Sending a Json in get request in java

There is an API which sends back data on get request from a database. The database is huge, so the data we need, we have to specify it in json. So actually we have to send a json with get request to get back the desired data. It has been implemented…
Asim
  • 51
  • 7
0
votes
0 answers

How to append a service uuid to the location, which we get from the response of a successful Post request. I am using webClient for the request

I am sending a post request, with a json body, using webclient to the mock simulator(server) which has been created, which gives us the response. For the post request specifically, I just need the service uuid which is present in the simulator to be…
Ashish
  • 21
  • 2
0
votes
1 answer

WebTestClient gets 404 on Spring Boot 2.4.0-M3 while works fine on 2.4.0-M2

I have test that works properly with Spring 2.4.0-M2 but after upgrading to 2.4.0-M3 it breaks - returns 404 for a route that is registered. My app: @SpringBootApplication(proxyBeanMethods = false) class ExampleApp fun main(args: Array) { …
pixel
  • 24,905
  • 36
  • 149
  • 251
0
votes
1 answer

Spring WebClient header from ReactiveSecurityContext

I'm trying to set WebClient header value accordingly to the authenticated user, something like this: webClient.post().header(HttpHeaders.AUTHORIZATION, getUserIdFromSession())... and public String getUserIdFromSession() { Mono
0
votes
2 answers

Spring WebClient pass dynamic request body as JSON

I want to pass the generic request body while making API call through WebClient. I have dynamic key-value pairs in the database like (key1-value1, key2-value2, key3-value3). This key-value may grow or shrink. Is there any way to call API with…
salman irfan khandu
  • 109
  • 1
  • 3
  • 12
0
votes
0 answers

How do I properly Unit Test Spring Boot Reactive app with Kotlin & Kotest

I'm fairly new to Kotlin and Kotest, been scratching my head on how to properly unit test webflux application. Looking over kotest samples here, to me that looks like it's spinning up a WebTestClient server and is more like integration test(please…
Chris
  • 90
  • 10
0
votes
0 answers

Spring WebClient Connection Refused Error

When I'm trying to send POST request with WebClient, I get the following error.However if I try to send the request to the same uri using postman it is successful.Please help me out on this I am stuck in this issue and I am new to Spring…
0
votes
1 answer

authorization code flow without code_challenge_method & code_challenge via spring-security-oauth2-client

We have identity server which does not support PKCE. It cannot be modified to include PKCE. I am trying to implement authorization code flow on same identity server using spring-security-oauth2-client , spring-boot-starter-security & webclient. The…
0
votes
1 answer

Reactor - How to avoid recursion?

Using spring WebFlux, I would like to send HTTP requests one-by-one until a response fulfils a certain criteria. I also need to collect all responses. In the blocking world, the solution would be something like this: List responses = new…
nagy.zsolt.hun
  • 6,292
  • 12
  • 56
  • 95
0
votes
0 answers

Why is my WebClient exceptions not being captured?

I have a method that when the user clicks a button, it calls another method and invokes a WebClient, etc. Basically, the WebClient throws an exception but the calling method is not capturing it. For example, here is a shortened version: Calling…
cbmeeks
  • 11,248
  • 22
  • 85
  • 136
0
votes
1 answer

Spring boot Web Client : Host was not found

I am trying to run a spring-bot micro-service using netflix-eureka and webflux and I have the following problem: When I try to launch a request using webClient on one of my other micro-service it fails but it works with rest template. My pom.xml…
Infinite Learner
  • 196
  • 1
  • 1
  • 8
0
votes
0 answers

How to get the request metrics with WebClient or HttpClient

I'm trying to get the metrics (dns resolver time, tls handshake time...) associated to a single request and correlate the metrics with the response. The purpose is to do a http request, process the response and store somewhere the status and the…
Nicolas Labrot
  • 4,017
  • 25
  • 40