-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
Remove leftover RestClient
attribute methods
#31625
Comments
A fair question. They are leftovers from an abandoned experiment that should never have made it into 6.1.0 GA. Therefore, the |
So I actually used the attributes but wasn't aware it was not working. What is the alternative to putting attributes onto the request in this? uriVariables is a HashMap that I was passing in. I don't see another way to add the request attributes other than calling url(u -> u.build(uriVariables)) but I think that is to build the actual url from its constituent components. I just want to pass the url in its entirety and then pass some variable onto it. I could expand them on the url String before I make the call I guess.
|
In the From your description, it looks like you are trying to build a URI with query parameters based on a map. You can do that by doing something like: restClient.method(method)
.uri(uriBuilder -> uriBuilder.queryParams(queryParams).build())
.retrieve()
... |
yeah I saw that but I was missing the url part so I ended up with this. I haven't tested it yet.
|
RestClient
attribute methods
Affects: Spring Framework 6.1.0-RC2
The new RestClient allows you to set attributes but it seems that they are not saved in the ClientHttpRequest so you can't retrieve them in a ClientHttpRequestInterceptor.
So what are the RestClient attributes for?
The text was updated successfully, but these errors were encountered: