Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Will be great if Drupal 8 implement PUT REST state to update entities instead of POST, PUT is the standard for Update process, Front End framework like Backbone JS use this State for Update.
Comment | File | Size | Author |
---|---|---|---|
#1 | enable_put_method_to-2399813-1.patch | 7.69 KB | -enzo- |
Comments
Comment #1
-enzo- CreditAttribution: -enzo- commentedI did a patch to implement REST State PUT for entity updates, this patch was created on top patch #2300677: JSON:API POST/PATCH support for fully validatable config entities.
Summary of patch
Add a new Method: PUT
Add a new format: form handle by JSON serialize
ToDo.
The logic save the entity but don't receive properly the values send by client
Comment #2
pcambraFrom https://groups.drupal.org/node/284948
I think PATCH is preferred.
Comment #3
klausiDid you try PATCH with backbone? It should work nearly identical to PUT, except that you only have to send fields that you want to change.
Comment #4
-enzo- CreditAttribution: -enzo- commentedOHH I didn't know that.
OK I will work in that direction, and inform my results thanks @klausi
Comment #5
clemens.tolboomI can confirm patch is working on hal+json so closing this.