Created
December 2, 2018 00:25
-
-
Save d11z/ec4e66ea6138bc13f6c83b189b3ab51a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@host = http://localhost:8080/api | |
### | |
# @name register | |
POST {{host}}/login | |
Content-Type: application/json | |
{ | |
"username": "tester", | |
"password": "password" | |
} | |
### | |
# @name login | |
POST {{host}}/login | |
Content-Type: application/json | |
{ | |
"username": "tester", | |
"password": "password" | |
} | |
### | |
# @name newPost | |
@token = {{login.response.body.token}} | |
POST {{host}}/posts | |
Authorization: Bearer {{token}} | |
Content-Type: application/json | |
{ | |
"title": "example post", | |
"url": "http://google.com", | |
"category": "test" | |
} | |
### | |
# @name getPosts | |
GET {{host}}/posts | |
### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment