Optional Query Parameters in Quarkus Rest Client #30831
Replies: 4 comments 9 replies
-
/cc @Sgitario (rest-client), @cescoffier (rest-client), @geoand (rest-client) |
Beta Was this translation helpful? Give feedback.
-
I don't remember if |
Beta Was this translation helpful? Give feedback.
-
We support using a Map of MultivaluedMap with @restquery.
Have you tried that?
…On Sat, Feb 4, 2023, 01:18 Jack Farley ***@***.***> wrote:
It would be a cool feature if optional parameters and headers were left
out when empty and included as regular values when not empty.
—
Reply to this email directly, view it on GitHub
<#30831 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBMDP2WJEUBK4CORTEURILWVWG4DANCNFSM6AAAAAAUPPTAEE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@geoand I'm now running into a similar problem with Java objects that are being serialized into JSON objects in the bodies of POST requests. If I have several combinations of fields that might need to be in a JSON object, would I need a separate Java object for each combo, or do you know of a workaround? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the Quarkus Reactive Rest Client to access an external api, and a few of the endpoints allow for several optional query parameters. Based on the situation, I'm going to be providing some of these parameters in many different combinations. It seems like to do this I would need a different method in my rest client for every combination of parameters that I provide. Is there a better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions