Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some suggestion on DELETE Method #68

Open
michalbundyra opened this issue Jan 10, 2020 · 1 comment
Open

Some suggestion on DELETE Method #68

michalbundyra opened this issue Jan 10, 2020 · 1 comment
Labels
Enhancement New feature or request

Comments

@michalbundyra
Copy link
Member

  1. delete() and deleteList() method in Resource objects needs accept data from request body, since in such scenario, user need to give comments on why this action happens and provides other related information.
  2. I think it's better to return 202 Accepted as response for DELETE method, better than 204 no content.

Originally posted by @snowwolf007cn at zfcampus/zf-apigility#49

@michalbundyra michalbundyra added the Enhancement New feature or request label Jan 10, 2020
@michalbundyra
Copy link
Member Author

Agreed with (1); I'll work on that for either 1.0.3 or 1.1.0.

As for (2), 202 indicates the request has been accepted, but not processed. In the majority of cases, this is likely entirely incorrect, and 204 is the more accurate case (as there is no content returned, as the resource no longer exists to be represented).


Originally posted by @weierophinney at zfcampus/zf-apigility#49 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant