Description
Bradley Buda opened SPR-14857 and commented
It would be useful to me and my team if RestTemplate supported the HTTP PATCH method on equal footing with the other common HTTP methods (GET, PUT, POST, DELETE). My team's RESTful APIs use PATCH extensively, as do many public REST APIs (Salesforce, Github, and Google Drive off the top of my head). I am willing to do the implementation of this, but I wanted to reach out and see if there was interest before I began work / send a PR.
I understand that PATCH is possible via the exchange
/ execute
methods, but their signatures are much more verbose and less ergonomic for simple cases.
The APIs would follow the same structure as the POST APIs, since the relevant RFC seems to indicate that PATCH can return a response (in my team we return 204 No Content from successful PATCHes, but that might not be the case for others). I would also submit a PR to spring-boot for a similar change in TestRestTemplate (my true goal ;))
Issue Links:
- Introduce patchForObject/patchForLocation to RestTemplate/RestOperations [SPR-14974] #19540 Introduce patchForObject/patchForLocation to RestTemplate/RestOperations ("is duplicated by")
- Proper handling of parameterized types in RestTemplate [SPR-7023] #11685 Proper handling of parameterized types in RestTemplate
- Provide builders for HttpEntity and ResponseEntity [SPR-11752] #16374 Provide builders for HttpEntity and ResponseEntity
- Introduce HttpEntity [SPR-6969] #11634 Introduce HttpEntity
Referenced from: commits dbe81be, 594f4d5
1 votes, 6 watchers