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

Resource Controller HTTP methods #112

Closed
juliocbcotta opened this issue Jan 16, 2017 · 5 comments
Closed

Resource Controller HTTP methods #112

juliocbcotta opened this issue Jan 16, 2017 · 5 comments
Assignees

Comments

@juliocbcotta
Copy link

Hi, I am trying to figure out what are the HTTP methods used for each action in a Resource controller as shown here

  var index: Multiple?
    var store: Multiple?
    var show: Item?
    var replace: Item?
    var modify: Item?
    var destroy: Item?
    var clear: Multiple?
    var aboutItem: Item?
    var aboutMultiple: Multiple?

So index and show uses GET. destroy uses DELETE, but how about the others? The documentation could have something like

  var index: Multiple?  // GET
    var store: Multiple?
    var show: Item?  // GET
    var replace: Item?
    var modify: Item?
    var destroy: Item? // DELETE
    var clear: Multiple?
    var aboutItem: Item?
    var aboutMultiple: Multiple?

or a table showing also the resource path i.e

index : GET controller/index
show : GET controller/1
destroy : DELETE controller/1
@tanner0101
Copy link
Member

Check out https://docs.vapor.codes/2.0/vapor/controllers/#resources

@brunobl
Copy link

brunobl commented May 25, 2017

Unless I'm mistaken, documentation still hasn't changed about this issue.

For example, what is destroy precisely?
What is aboutMultiple? How to use it?

@superarts
Copy link

superarts commented Jun 7, 2017

@tanner0101 destroy, aboutItem, and aboutMultiple are not documented yet. Any idea please?

@tanner0101 tanner0101 self-assigned this Jun 14, 2017
@pdesantis
Copy link
Contributor

Agreed, I can't find any documentation on destroy, aboutItem and aboutMultiple. Should this issue be reopened?

@tanner0101
Copy link
Member

Whoops, sorry about that. Fixed: https://docs.vapor.codes/2.0/vapor/controllers/#resources

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

No branches or pull requests

5 participants