-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Description
Sébastien Deleuze opened SPR-13154 and commented
Since #17408 make it possible to use parameterized type for writing the response body, it would be nice to be able to do the same for request body in client side use cases.
Since we don't have this information in the method declaration like for server side, the user will have to provide the type explicitly.
The proposal for this:
- Retaining the type as an
RequestEntity#type
property - In
RequestEntity.BodyBuilder
, addingRequestEntity<T> body(T body, Type type)
method - In
RestTemplate#doWithRequest()
, useRequestEntity#type
if defined to get the type information, and call the type-awarecanWrite()
andwrite()
methods if the message converter implementsGenericHttpMessageConverter
Issue Links:
- Make @ResponseBody method return type available to message converters [SPR-12811] #17408 Make
@ResponseBody
method return type available to message converters
Referenced from: commits 3329abf
0 votes, 5 watchers
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement