21 lines
368 B
HTTP
21 lines
368 B
HTTP
@baseUrl = https://example.com/api
|
|
|
|
# @name login
|
|
POST {{baseUrl}}/api/login HTTP/1.1
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
name=foo&password=bar
|
|
|
|
###
|
|
|
|
@authToken = {{login.response.headers.X-AuthToken}}
|
|
|
|
# @name createComment
|
|
POST {{baseUrl}}/comments HTTP/1.1
|
|
Authorization: {{authToken}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"content": "fake content"
|
|
}
|