Skip to content
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

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

Closed
spring-projects-issues opened this issue Oct 28, 2016 · 4 comments
Closed

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

spring-projects-issues opened this issue Oct 28, 2016 · 4 comments
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 28, 2016

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:

  • #19540 Introduce patchForObject/patchForLocation to RestTemplate/RestOperations ("is duplicated by")
  • #11685 Proper handling of parameterized types in RestTemplate
  • #16374 Provide builders for HttpEntity and ResponseEntity
  • #11634 Introduce HttpEntity

Referenced from: commits dbe81be, 594f4d5

1 votes, 6 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 28, 2016

Rossen Stoyanchev commented

I recall requests for additional variants of PUT, POST, and DELETE. It makes sense to have the basic variants for PATCH to be on par with the other HTTP methods.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 17, 2016

Arjen Poutsma commented

Fixed in dbe81be

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Dec 3, 2016

Juergen Hoeller commented

Since we got a second request for this already (#19540) and this seems like a straightforward enough addition, I'll consider it for a backport to 4.3.5.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Dec 5, 2016

Eric Deandrea commented

A backport to 4.x would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.