WordPress/wp-includes/rest-api
Rachel Baker 5564716a07 REST API: Modify the structure of our DELETE responses to be more explicit.
Add the `deleted` property to the root of the Response object to communicate if the delete action was successful. Move the state of the resource prior to the delete request under a new `previous` property.  As a result DELETE responses are now structured like so:
 `{ deleted: true, previous: { ... } }`

Also includes helpful information to DELETE requests for resources that are not trashable.

Props timmydcrawford, rmccue, jnylen0.
Fixes #38494.
Built from https://develop.svn.wordpress.org/trunk@39126


git-svn-id: http://core.svn.wordpress.org/trunk@39066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:29 +00:00
..
endpoints REST API: Modify the structure of our DELETE responses to be more explicit. 2016-11-04 17:11:29 +00:00
fields REST API: Add support for "integer" type for meta and options 2016-10-31 16:07:31 +00:00
class-wp-rest-request.php REST API: Only provide JSON error code on PHP 5.3+. 2016-11-03 04:57:30 +00:00
class-wp-rest-response.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-wp-rest-server.php REST API: Support querying for multiple post statuses. 2016-11-03 01:46:29 +00:00