From aa141fddc3eef009ef0b8d825c18223ccdb1cca3 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 13 Nov 2024 12:58:26 -0500 Subject: [PATCH] Update launchsettings and http file --- .../Properties/launchSettings.json | 21 +++++++--------- sample/src/NimblePros.SampleToDo.Web/api.http | 24 ++++++++++--------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/sample/src/NimblePros.SampleToDo.Web/Properties/launchSettings.json b/sample/src/NimblePros.SampleToDo.Web/Properties/launchSettings.json index 4e40822b6..d9113db75 100644 --- a/sample/src/NimblePros.SampleToDo.Web/Properties/launchSettings.json +++ b/sample/src/NimblePros.SampleToDo.Web/Properties/launchSettings.json @@ -3,27 +3,24 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:57678/", + "applicationUrl": "http://localhost:57677/", "sslPort": 0 } }, "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", + "https": { + "commandName": "Project", + "dotnetRunMessages": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "applicationUrl": "https://localhost:57678/" }, - "NimblePros.SampleToDo.Web": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "swagger", + "IIS Express": { + "commandName": "IISExpress", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:57678/" + } } } } \ No newline at end of file diff --git a/sample/src/NimblePros.SampleToDo.Web/api.http b/sample/src/NimblePros.SampleToDo.Web/api.http index bb6e8791e..f55bd135d 100644 --- a/sample/src/NimblePros.SampleToDo.Web/api.http +++ b/sample/src/NimblePros.SampleToDo.Web/api.http @@ -1,31 +1,33 @@ # For more info on HTTP files go to https://aka.ms/vs/httpfile -@hostname=localhost +@host=https://localhost @port=57678 // List all contributors -GET http://{{hostname}}:{{port}}/Contributors +GET {{host}}:{{port}}/Contributors ### // Get a specific contributor @id_to_get=1 -GET http://{{hostname}}:{{port}}/Contributors/{{id_to_get}} +GET {{host}}:{{port}}/Contributors/{{id_to_get}} ### // Add a new contributor -POST http://{{hostname}}:{{port}}/Contributors +POST {{host}}:{{port}}/Contributors Content-Type: application/json { - "name": "John Doe" + "name": "John Doe 2", + "email": "test@test.com", + "phoneNumber": "1234567890" } ### // Update a contributor @id_to_update=1 -PUT http://{{hostname}}:{{port}}/Contributors/{{id_to_update}} +PUT {{host}}:{{port}}/Contributors/{{id_to_update}} Content-Type: application/json { @@ -37,9 +39,9 @@ Content-Type: application/json // Delete a contributor @id_to_delete=1 -DELETE http://{{hostname}}:{{port}}/Contributors/{{id_to_delete}} +DELETE {{host}}:{{port}}/Contributors/{{id_to_delete}} + -### // List all Projects GET http://{{hostname}}:{{port}}/Projects @@ -48,12 +50,12 @@ GET http://{{hostname}}:{{port}}/Projects // Get a specific project @id_to_get=1 -GET http://{{hostname}}:{{port}}/Projects/{{id_to_get}} +GET {{host}}:{{port}}/Projects/{{id_to_get}} ### // Create a new project -POST http://{{hostname}}:{{port}}/Projects +POST {{host}}:{{port}}/Projects Content-Type: application/json { @@ -65,7 +67,7 @@ Content-Type: application/json // Mark an item as complete @project_id=1 @item_id=2 -POST http://{{hostname}}:{{port}}/Projects/{{project_id}}/ToDoItems/{{item_id}} +POST {{host}}:{{port}}/Projects/{{project_id}}/ToDoItems/{{item_id}} Content-Type: application/json {