Home > Enterprise >  For restfulness, should I use one method for different get requests or seperate them
For restfulness, should I use one method for different get requests or seperate them

Time:10-16

I am making a Blackjack rest service, and currently have 4 GET endpoints:

/hit
/stand
/double down
/surrender

I could also make just 1 POST/PATCH endpoint that uses a dto to send a move, or should I keep using these four uri's?

Which option would be more restful/better?

Thanks in advance.

CodePudding user response:

Use one endpoint. All of these actions/commands are working with the same set of data.

  • Related