question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a way to add multiple `QueryParams` when using `WebClient.prepare()`

See original GitHub issue

Some users may want to add multiple query param values for a single key

e.g. localhost:8080/v1?id=1&id=2&id=3

However, WebClient.prepare().queryParam() performs a QueryParamsBuilder#setObject by default, making it difficult to execute such a query programmatically

WebClient.prepare()
         .get("/")
         .queryParam("id", 1)
         .queryParam("id", 2)
         .queryParam("id", 3)
         .execute();

Wondering if we want to modify to use QueryParamsBuilder#addObject under the hood.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
ikhooncommented, Mar 28, 2022

Don’t worry. I believe @doppany will understand the situation. 🙇‍♂️ I think you have already finished your work. Would you mind making your change a PR?

2reactions
doppanycommented, Mar 28, 2022

@Jsing I think it would be better if you keep going for this issue 😆. If you create the first PR, I will be happy too! I’ll look into other issues 🧐 , don’t worry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring WebClient Requests with Parameters - Baeldung
The queryParam() method accepts variable arguments as values, so there's no need to call the method several times. Alternatively, we can omit ...
Read more >
Passing query parameters through your WebClient - Medium
In this approach we are going to leverage the `queryParams()` method of the UriBuilder class found in `package org.springframework.web.util;`.
Read more >
Add URI Parameters to Spring WebClient Requests - amitph
A guide to add Request URI parameters - path parameters & query parameters to the requests made by Spring WebFlux WebClient.
Read more >
How to add a query parameter for all requests in Spring Webflux
I found another way, without custom UriBuilderFactory: this.client = WebClient.builder().baseUrl(url) .filter((request, next) -> { URI ...
Read more >
How to Set Request Parameters With WebClient
Following that, you'll see three queryParam() methods. That's where you put your query parameters. The first parameter in queryParam() specifies the name of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found