Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 804 Bytes

api.rest

File metadata and controls

37 lines (26 loc) · 804 Bytes

@baseUrl = http://localhost:9999

###

# @name login POST {{baseUrl}}/login HTTP/1.1 Content-Type: application/x-www-form-urlencoded

username=admin&password=admin

###

@authToken = {{login.response.body.token}} GET {{baseUrl}}/api/v1/clients HTTP/1.1 Content-Type: application/json Authorization: Bearer {{authToken}}

###

@authToken = {{login.response.body.token}} GET {{baseUrl}}/api/v1/clients?code=1234 HTTP/1.1 Content-Type: application/json Authorization: Bearer {{authToken}}

###

@authToken = {{login.response.body.token}} GET {{baseUrl}}/api/v1/clients?name=vienas HTTP/1.1 Content-Type: application/json Authorization: Bearer {{authToken}}

###

@authToken = {{login.response.body.token}} GET {{baseUrl}}/not-found HTTP/1.1 Content-Type: application/json Authorization: Bearer {{authToken}}