Skip to content

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

Open

Description

@matyikriszta

@samsworldofno could you add some details about this issue?

Activity

  1. samsworldofno commented on Apr 13, 2016

    @samsworldofno
    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.

  2. 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[/+] on Apr 13, 2016
  3. matyikriszta commented on Apr 13, 2016

    @matyikriszta
    ContributorAuthor

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions