-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyFirstWebAPIProject.http
More file actions
43 lines (33 loc) · 865 Bytes
/
MyFirstWebAPIProject.http
File metadata and controls
43 lines (33 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@MyFirstWebAPIProject_HostAddress = http://localhost:5120
GET {{MyFirstWebAPIProject_HostAddress}}/weatherforecast/
Accept: application/json
### Get All Products
GET {{MyFirstWebAPIProject_HostAddress}}/api/products
Accept: application/json
###
### Get Product with ID 1
GET {{MyFirstWebAPIProject_HostAddress}}/api/products/1
Accept: application/json
###
### Create a New Product
POST {{MyFirstWebAPIProject_HostAddress}}/api/products
Content-Type: application/json
{
"Name": "New Product",
"Price": 39.99,
"Category": "Books"
}
###
### Update Product with ID 1
PUT {{MyFirstWebAPIProject_HostAddress}}/api/products/1
Content-Type: application/json
{
"Id": 1,
"Name": "Updated Product",
"Price": 49.99,
"Category": "Electronics"
}
###
### Delete Product with ID 1
DELETE {{MyFirstWebAPIProject_HostAddress}}/api/products/1
###