-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support @Encoded for query parameters in REST Client Reactive #23961
Comments
CC @sraturi |
I checked that this is doable. OTOH, it may be unsafe in some circumstances, I think. @geoand @radcortez what do you guys think of supporting |
The alternative being that the user needs to setup the proper string manually? |
IIUC, curerntly @sraturi is not able to send query params he needs with the client. OTOH, as he points out himself, the server he contacts should support encoded params (it doesn't and that's the problem he's trying to work around). |
Yeah, I'm not so sure doing this on the client is correct way to go... |
We really don't have any saying in 3rd party service implementations ... |
Not really |
These changes add support for the `@Encoded` annotation for PATH and QUERY params. As stated in the Encoded annotation javadocs, we can use this annotation at class and method level too, so we can use it in REST Client reactive like this. Fix quarkusio#23961
These changes add support for the `@Encoded` annotation for PATH and QUERY params. As stated in the Encoded annotation javadocs, we can use this annotation at class and method level too, so we can use it in REST Client reactive like this. Fix quarkusio#23961
These changes add support for the `@Encoded` annotation for PATH and QUERY params. As stated in the Encoded annotation javadocs, we can use this annotation at class and method level too, so we can use it in REST Client reactive like this. Fix quarkusio#23961
Description
From GitHub discussion:
Hello,
I am following this guide https://quarkus.io/guides/rest-client to communicate with a 3rd party API. Overall everything works but there is a small issue I am running with query param.
I am able to set up query param as described in the tutorial. However, I am not able to use the Encoded string as a query param.
For example
I have this endpoint
Also, the third-party follows the odata conventions.
Now when I pass in a single field into this method, everything works, I get a list with that field.
However, when I put in multiple fields, so something like deviceSelect("name,id"), I run into malformed URL. Basically, the other endpoint is expecting the actual , but our endpoint is passing it with % encoded.
i.e valid: /device?$select=name,id
whats generated: /device?%24select=name%2Cid
I know the third-party API is supposed to handle the encoded inputs but I need a solution while they fix that.
I tried annotating the param, method, and class with @encoded but had no luck...
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: