Skip to content

Add PATCH HTTP operation to RestTemplate [SPR-14857] #19423

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits dbe81be, 594f4d5

1 votes, 6 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions