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

Hangman game in JS lesson 5 documentation is not clear #284

Open
matyikriszta opened this issue Apr 13, 2016 · 2 comments
Open

Hangman game in JS lesson 5 documentation is not clear #284

matyikriszta opened this issue Apr 13, 2016 · 2 comments

Comments

@matyikriszta
Copy link
Contributor

@samsworldofno could you add some details about this issue?

@samsworldofno
Copy link
Contributor

Sure thing @matyikriszta!

The documentation is not clear on the hangman API for requests that need a body. Although the request body is illustrated in the format { token: game token, letter: guess }, the application actually takes data in x-www-form-urlencoded, so the request should be something like:

  curl -XPUT https://hangman/hangman -D "token=XXXXXX&letter=y"

The tutorial definitely doesn't make this clear enough, but moreover I suggest that we should change the application so that it accepts JSON. This would be more inkeeping with the previous tutorial and way more common than form parameters in the world of APIs. This pull request illustrates how this might be done on the PUT request only. If others agree that this approach is good, I'm happy to complete the change.

@samsworldofno samsworldofno changed the title Hangman game in JS lesson 5 does not work / documentation is not clear Hangman game in JS lesson 5 documentation is not clear Apr 13, 2016
@matyikriszta
Copy link
Contributor Author

@samsworldofno I agree with you, happy for you to implement that change

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

2 participants