jakubrohleder / angular-jsonapi

Simple and lightweight, yet powerful ORM for your frontend that seamlessly integrates with your JsonAPI server.
http://jakubrohleder.github.io/angular-jsonapi/
GNU General Public License v3.0
95 stars 34 forks source link

PATCH vs PUT #22

Open hedder opened 8 years ago

hedder commented 8 years ago

Of.spec claims to send PATCH request to update existing records instead of PUT. It also says that only updated attributes/relationships should be sent.

Updating a Resource's Attributes PATCH /articles/1 HTTP/1.1

link

Also, it could significantly decrease amount of data we're sending to the back-end.

ghost commented 8 years ago

+1, PUT is not part of the jsonapi.org spec: http://jsonapi.org/faq/#wheres-put

mkalpana commented 8 years ago

+1. PATCH should be used for updating existing records instead of PUT

yves-s commented 8 years ago

Yes, it would be nice to see a patch method. We just hacked a patch methode in the build file to fulfill the jsonapi.org requirements and update relations.