Skip to content

HTTPie Testing Commands

Rohan Nagar edited this page Sep 2, 2017 · 4 revisions

In addition to testing the endpoints with the tester.py script, you can run the following commands using HTTPie. Simply replace the brackets with the appropriate information and run the command via the command line.

Facebook

  • GET /users

    http -a {application}:{secret} GET localhost:9000/facebook/users?email={email} password:{password}

  • GET /photos

    http -a {application}:{secret} GET localhost:9000/facebook/photos?email={email} password:{password}

  • GET /videos

    http -a {application}:{secret} GET localhost:9000/facebook/videos?email={email} password:{password}

  • GET /extendedToken

    http -a {application}:{secret} GET localhost:9000/facebook/extendedToken?email={email} password:{password}

  • GET /oauthUrl

    http -a {application}:{secret} GET localhost:9000/facebook/oauthUrl?redirect={redirect}

  • POST /publish

    http -a {application}:{secret} -f POST "localhost:9000/facebook/publish?email={email}&type={type}&message={message}" file@path/to/file title="Some Title" password:{password}

Twitter

  • GET /users

    http -a {application}:{secret} GET localhost:9000/twitter/users?email={email} password:{password}

  • GET /oauthUrl

    http -a {application}:{secret} GET localhost:9000/twitter/oauthUrl

  • POST /publish

    http -a {application}:{secret} -f POST "localhost:9000/twitter/publish?email={email}&type={type}&message={message}" file@path/to/file password:{password}

Clone this wiki locally