47 lines
750 B
HTTP
47 lines
750 B
HTTP
POST {{apiBaseUrl}}/auth/login
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"username": "admin",
|
|
"password": "123456"
|
|
}
|
|
|
|
> {% client.global.set("auth_token", response.body.accessToken); %}
|
|
|
|
|
|
### GET request with parameter
|
|
GET {{apiBaseUrl}}/users
|
|
Accept: application/json
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
|
|
|
|
### GET request with parameter
|
|
POST {{apiBaseUrl}}/auth/logout
|
|
Accept: application/json
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
|
|
|
|
### GET request with parameter
|
|
GET {{apiBaseUrl}}/products
|
|
Accept: application/json
|
|
|
|
### Post
|
|
POST {{apiBaseUrl}}/products
|
|
Accept: application/json
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"name": "p22",
|
|
"price": 3,
|
|
"is_available": true
|
|
}
|
|
|
|
|
|
### GET
|
|
|
|
# curl -i http://httpbin.org/ip
|
|
GET http://httpbin.org/ip
|
|
|
|
### |