Fix some endpoints in web.http
This commit is contained in:
114
src/Web/Web.http
114
src/Web/Web.http
@@ -1,12 +1,10 @@
|
|||||||
# For more info on HTTP files go to https://aka.ms/vs/httpfile
|
# For more info on HTTP files go to https://aka.ms/vs/httpfile
|
||||||
@Web_HostAddress = https://localhost:5001
|
|
||||||
|
|
||||||
@Email=administrator@localhost
|
@Email=administrator@localhost
|
||||||
@Password=Administrator1!
|
@Password=Administrator1!
|
||||||
@BearerToken=<YourToken>
|
@auth_token=<Your Token>
|
||||||
|
|
||||||
# POST Users Register
|
# POST Users Register
|
||||||
POST {{Web_HostAddress}}/api/Users/Register
|
POST {{base_url}}/api/Users/Register
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -17,7 +15,7 @@ Content-Type: application/json
|
|||||||
###
|
###
|
||||||
|
|
||||||
# POST Users Login
|
# POST Users Login
|
||||||
POST {{Web_HostAddress}}/api/Users/Login
|
POST {{base_url}}/api/Users/login
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -25,11 +23,13 @@ Content-Type: application/json
|
|||||||
"password": "{{Password}}"
|
"password": "{{Password}}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> {% client.global.set("auth_token", response.body); %}
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
# POST Users Refresh
|
# POST Users Refresh
|
||||||
POST {{Web_HostAddress}}/api/Users/Refresh
|
POST {{base_url}}/api/Users/Refresh
|
||||||
Authorization: Bearer {{BearerToken}}
|
Authorization: Bearer {{auth_token}}
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -39,101 +39,11 @@ Content-Type: application/json
|
|||||||
###
|
###
|
||||||
|
|
||||||
# GET WeatherForecast
|
# GET WeatherForecast
|
||||||
GET {{Web_HostAddress}}/api/WeatherForecasts
|
GET {{base_url}}/api/WeatherForecasts
|
||||||
Authorization: Bearer {{BearerToken}}
|
Authorization: Bearer {{auth_token}}
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
# GET TodoLists
|
# GET GetMyUser
|
||||||
GET {{Web_HostAddress}}/api/TodoLists
|
GET {{base_url}}/api/GetMyUser
|
||||||
Authorization: Bearer {{BearerToken}}
|
Authorization: Bearer {{auth_token}}
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
# POST TodoLists
|
|
||||||
POST {{Web_HostAddress}}/api/TodoLists
|
|
||||||
Authorization: Bearer {{BearerToken}}
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
// CreateTodoListCommand
|
|
||||||
{
|
|
||||||
"Title": "Backlog"
|
|
||||||
}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
# PUT TodoLists
|
|
||||||
PUT {{Web_HostAddress}}/api/TodoLists/1
|
|
||||||
Authorization: Bearer {{BearerToken}}
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
// UpdateTodoListCommand
|
|
||||||
{
|
|
||||||
"Id": 1,
|
|
||||||
"Title": "Product Backlog"
|
|
||||||
}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
# DELETE TodoLists
|
|
||||||
DELETE {{Web_HostAddress}}/api/TodoLists/1
|
|
||||||
Authorization: Bearer {{BearerToken}}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
# GET TodoItems
|
|
||||||
@PageNumber = 1
|
|
||||||
@PageSize = 10
|
|
||||||
GET {{Web_HostAddress}}/api/TodoItems?ListId=1&PageNumber={{PageNumber}}&PageSize={{PageSize}}
|
|
||||||
|
|
||||||
Authorization: Bearer {{BearerToken}}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
# POST TodoItems
|
|
||||||
POST {{Web_HostAddress}}/api/TodoItems
|
|
||||||
Authorization: Bearer {{BearerToken}}
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
// CreateTodoItemCommand
|
|
||||||
{
|
|
||||||
"ListId": 1,
|
|
||||||
"Title": "Eat a burrito 🌯"
|
|
||||||
}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
#PUT TodoItems UpdateItemDetails
|
|
||||||
PUT {{Web_HostAddress}}/api/TodoItems/UpdateItemDetails?Id=1
|
|
||||||
Authorization: Bearer {{BearerToken}}
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
// UpdateTodoItemDetailCommand
|
|
||||||
{
|
|
||||||
"Id": 1,
|
|
||||||
"ListId": 1,
|
|
||||||
"Priority": 3,
|
|
||||||
"Note": "This is a good idea!"
|
|
||||||
}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
# PUT TodoItems
|
|
||||||
PUT {{Web_HostAddress}}/api/TodoItems/1
|
|
||||||
Authorization: Bearer {{BearerToken}}
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
// UpdateTodoItemCommand
|
|
||||||
{
|
|
||||||
"Id": 1,
|
|
||||||
"Title": "Eat a yummy burrito 🌯",
|
|
||||||
"Done": true
|
|
||||||
}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
# DELETE TodoItem
|
|
||||||
DELETE {{Web_HostAddress}}/api/TodoItems/1
|
|
||||||
Authorization: Bearer {{BearerToken}}
|
|
||||||
|
|
||||||
###
|
|
||||||
5
src/Web/http-client.env.json
Normal file
5
src/Web/http-client.env.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"dev": {
|
||||||
|
"base_url": "https://localhost:5001"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user