Skip to content

Clarify documentation on the usage of RestClient in POST scenarios without response body #34334

Closed
@mrnst

Description

@mrnst

The documentation of Spring RestClient should reflect the change of behaviour in the RestClient's (or rather RestClient.RequestHeadersSpec's) retrieve() method since Spring Framework 6.2 more explicitly, especially its possible consequences in POST scenarios without response body.

The change is significant enough to break an application (which it did in my case, when I updated to Spring Boot 3.4). It took me quite some time and debugging to find out the reason although I immediately checked the above documentation.

I'm aware that the release notes for Spring Framework 6.2 and this javadoc describe the new behaviour.

But I think that an update to the above documentation would be very helpful for developers, because the current description appears to be misleading, and the new behaviour (which is: not to execute the request) is not necessarily what you would intuitively expect from a method named retrieve() and described as "Retrieve the response".

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions