Skip to content

Instantly share code, notes, and snippets.

@zdne
Created November 7, 2013 20:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zdne/7361466 to your computer and use it in GitHub Desktop.
Save zdne/7361466 to your computer and use it in GitHub Desktop.
This is the full listing to http://docs.urlencoded.apiary.io

FORMAT: 1A

URL-Encoded Form

Answer to "How to format a POST request on apiary.io". Make sure to refer to "application/x-www-form-urlencoded or multipart/form-data".

Login [/users/login]

Make Login [POST]

Do not forget to escape [ with %5B and ] with %5D in data[User][username]=qq&data[User][password]=qq&data[User][remember]=0.

API Blueprint Source:

# Login [/users/login]
## Make Login [POST]
+ Request (application/x-www-form-urlencoded)

        data%5BUser%5D%5Busername%5D=qq&data%5BUser%5D%5Bpassword%5Dqq&data%5BUser%5D%5Bremember%5D=0

+ Response 201
  • Request (application/x-www-form-urlencoded)

      data%5BUser%5D%5Busername%5D=qq&data%5BUser%5D%5Bpassword%5Dqq&data%5BUser%5D%5Bremember%5D=0
    
  • Response 201

@m9iv
Copy link

m9iv commented Sep 10, 2014

Thanks a lot : )

@Chicooz
Copy link

Chicooz commented Apr 14, 2016

data%5BUser%5D%5Busername%5D=qq&data%5BUser%5D%5Bpassword%5D=qq&data%5BUser%5D%5Bremember%5D=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment