Skip to content

Commit

Permalink
Added http calls API development inner-loop Visual Studio 2022 17.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanz86 authored and jasontaylordev committed Jun 27, 2023
1 parent ec394cb commit aaddbca
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CleanArchitecture.sln
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "playground", "playground", "{23C6AA70-9BAB-4963-973D-44D3274F34D8}"
ProjectSection(SolutionItems) = preProject
playground\TodoItems.http = playground\TodoItems.http
playground\TodoLists.http = playground\TodoLists.http
playground\WeatherForecast.http = playground\WeatherForecast.http
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
57 changes: 57 additions & 0 deletions playground/TodoItems.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@AuthToken = eyJhbGciOiJSUzI1NiIsImtpZCI6IkRldmVsb3BtZW50IiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo0NDQ0NyIsIm5iZiI6MTY3NzkyNTI0NywiaWF0IjoxNjc3OTI1MjQ3LCJleHAiOjE2Nzc5Mjg4NDcsImF1ZCI6IldlYlVJQVBJIiwic2NvcGUiOlsiV2ViVUlBUEkiLCJvcGVuaWQiLCJwcm9maWxlIl0sImFtciI6WyJwd2QiXSwiY2xpZW50X2lkIjoiQ2xlYW5BcmNoaXRlY3R1cmUuV2ViVUkiLCJzdWIiOiI3M2YzY2RiMC02YjRkLTRlZGEtOGYzMy03ZjFjODYyMzRiMTUiLCJhdXRoX3RpbWUiOjE2Nzc5MjUyNDQsImlkcCI6ImxvY2FsIiwic2lkIjoiOTM5REY4NzM0MzczN0E4OEQwQTREOEE2MTI0RjRDMTEiLCJqdGkiOiI0Nzg0QzFFMDNGQzlDMTFGRDkwMjEyRTMwMTVBRUQ4NSJ9.wSzL7_5cUNSCocZei-_iBulEh9PpoSsFrdeOymB7zIJ1B1sXXNS0hMMlWEJryNhcJ5wocJitUs35cYnZCDAv5ufUssztSttIG6GDAVxBbJsKVQsELPdC-FzjZx5fOCd9VXGkkykl2lcJtCQpuOuEFKR_eo6koqX4iI_kK33r10a3tCUjsZfVz3-wbLoK7imDcISNbGZosTMEZfw-BTvBIKoAn5DndgWWs0xp9LIphP2a-mczd7PKDiUriRyT1TMn_CGsyd1MUb9mvD0aV2jiPc5qRm5Rf4KKQTWKSkKv_ToTRSCWSvwV7HLOwOcY0dn4mYaNHHbc7wUDIkozHGkATA
@listId = 1
@id = 8

# GET TodoItems
@pageNumber = 1
@pageSize = 10
GET https://localhost:44447/api/TodoItems?ListId={{listId}}&PageNumber={{pageNumber}}&PageSize={{pageSize}}
Authorization: Bearer {{AuthToken}}

###

# POST TodoItems
POST https://localhost:44447/api/TodoItems
Authorization: Bearer {{AuthToken}}
Content-Type: application/json

{
"listId": {{listId}},
"title": "My todo item"
}


###

#POST TodoItems

PUT https://localhost:44447/api/TodoItems/{{id}}
Authorization: Bearer {{AuthToken}}
Content-Type: application/json

{
"id": {{id}},
"title": "My edited todo item",
"done": true
}

###

#DELETE TodoItems
DELETE https://localhost:44447/api/TodoItems/{{id}}
Authorization: Bearer {{AuthToken}}


###

#PUT TodoItems UpdateItemDetails
PUT https://localhost:44447/api/TodoItems/UpdateItemDetails?id={{id}}
Authorization: Bearer {{AuthToken}}
Content-Type: application/json

{
"id": {{id}},
"listId": {{listId}},
"priority": 0,
"note": "My note"
}
41 changes: 41 additions & 0 deletions playground/TodoLists.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@AuthToken = eyJhbGciOiJSUzI1NiIsImtpZCI6IkRldmVsb3BtZW50IiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo0NDQ0NyIsIm5iZiI6MTY3NzkyNTI0NywiaWF0IjoxNjc3OTI1MjQ3LCJleHAiOjE2Nzc5Mjg4NDcsImF1ZCI6IldlYlVJQVBJIiwic2NvcGUiOlsiV2ViVUlBUEkiLCJvcGVuaWQiLCJwcm9maWxlIl0sImFtciI6WyJwd2QiXSwiY2xpZW50X2lkIjoiQ2xlYW5BcmNoaXRlY3R1cmUuV2ViVUkiLCJzdWIiOiI3M2YzY2RiMC02YjRkLTRlZGEtOGYzMy03ZjFjODYyMzRiMTUiLCJhdXRoX3RpbWUiOjE2Nzc5MjUyNDQsImlkcCI6ImxvY2FsIiwic2lkIjoiOTM5REY4NzM0MzczN0E4OEQwQTREOEE2MTI0RjRDMTEiLCJqdGkiOiI0Nzg0QzFFMDNGQzlDMTFGRDkwMjEyRTMwMTVBRUQ4NSJ9.wSzL7_5cUNSCocZei-_iBulEh9PpoSsFrdeOymB7zIJ1B1sXXNS0hMMlWEJryNhcJ5wocJitUs35cYnZCDAv5ufUssztSttIG6GDAVxBbJsKVQsELPdC-FzjZx5fOCd9VXGkkykl2lcJtCQpuOuEFKR_eo6koqX4iI_kK33r10a3tCUjsZfVz3-wbLoK7imDcISNbGZosTMEZfw-BTvBIKoAn5DndgWWs0xp9LIphP2a-mczd7PKDiUriRyT1TMn_CGsyd1MUb9mvD0aV2jiPc5qRm5Rf4KKQTWKSkKv_ToTRSCWSvwV7HLOwOcY0dn4mYaNHHbc7wUDIkozHGkATA
@id = 1

# GET TodoLists
GET https://localhost:44447/api/TodoLists
Authorization: Bearer {{AuthToken}}

###

#GET TodoList
GET https://localhost:44447/api/TodoLists/{{id}}
Authorization: Bearer {{AuthToken}}

###

#POST TodoList
POST https://localhost:44447/api/TodoLists
Authorization: Bearer {{AuthToken}}
Content-Type: application/json

{
"Title": "My Todo List"
}

###

#PUT TodoList
PUT https://localhost:44447/api/TodoLists/{{id}}
Authorization: Bearer {{AuthToken}}
Content-Type: application/json

{
"Id": {{id}},
"Title": "My Todo List edited"
}

###

#DELETE TodoList
DELETE https://localhost:44447/api/TodoLists/{{id}}
Authorization: Bearer {{AuthToken}}
2 changes: 2 additions & 0 deletions playground/WeatherForecast.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#GET WeatherForecast
GET https://localhost:44447/api/WeatherForecast

0 comments on commit aaddbca

Please sign in to comment.