Skip to content

Commit

Permalink
Update launchsettings and http file
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis committed Nov 13, 2024
1 parent bafb0a8 commit aa141fd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
}
}
}
24 changes: 13 additions & 11 deletions sample/src/NimblePros.SampleToDo.Web/api.http
Original file line number Diff line number Diff line change
@@ -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

{
Expand All @@ -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
Expand All @@ -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

{
Expand All @@ -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

{
Expand Down

0 comments on commit aa141fd

Please sign in to comment.