Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Content response for DELETE request #58

Open
friendofpa opened this issue Jan 13, 2015 · 2 comments
Open

Content response for DELETE request #58

friendofpa opened this issue Jan 13, 2015 · 2 comments

Comments

@friendofpa
Copy link

Would like to have content responses for a DELETE requests. Currently returns 204 (No Content) status code.

public function delete($id) {
    return true;
    // Would like to return a response like below on success..
    // return array('status' => 'deleted', 'id' => $id);
}
@Maks3w
Copy link

Maks3w commented Mar 11, 2015

From http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not include an entity.

So the developer should have the freedom of return an object.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-rest; a new issue has been opened at laminas-api-tools/api-tools-rest#9.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants