By wim leers on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.2.x
Introduced in version:
8.2.0
Description:
When PATCHing an entity using REST, you would expect to get that updated entity back (particularly to be able to see computed fields, like the updated field), but Drupal 8.0.x/8.1.x's REST implementation does not do this. All you get is a HTTP 204 response with no body, to let you know the update was successful.
Consequently, in Drupal 8.0.x/8.1.x you first have to PATCH an entity and then GET it again. This is both painful and slow (2 round trips instead of one).
As of Drupal 8.2.0, Drupal's entity REST responses (\Drupal\rest\Plugin\rest\resource\EntityResource::patch()) return the updated entity.
Impacts:
Module developers
Themers