JoeBussard / polywordleapi

the api for playing polywordle
0 stars 0 forks source link

Feature: Allow new guesses on GET requests #59

Closed JoeBussard closed 2 years ago

JoeBussard commented 2 years ago

I could allow new guesses to be made using GET requests to /v1/game/<uuid> if the key-value pair for the guess is included in the URL. Since duplicate guesses are already checked for and handled, one could refresh the page/make consecutive GET requests with the same guess and not change the state of the game after the first guess.

JoeBussard commented 2 years ago

This way developers using the API would not have to worry about which HTTP method they are using, so long as the key-value pair is included in either JSON, form-date, or query param.

JoeBussard commented 2 years ago

If I did make the /v1/game/<uuid/ endpoint method-agnostic then it would have to return the same data payload for GET and POST. Currently a GET request returns the state of the game, whereas a POST request returns a success/failure message

JoeBussard commented 2 years ago

Allowing new guesses to be made by putting key-value pairs in the URL after /v1/game/<uuid>/ would be a terrible idea and would completely break the purpose of separating read and update actions into GET and POST. Closing