-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProduct.http
More file actions
62 lines (55 loc) · 1.11 KB
/
Copy pathProduct.http
File metadata and controls
62 lines (55 loc) · 1.11 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@host=https://localhost:5001
### Get all products
GET {{host}}/api/Product
### Get product by id
GET {{host}}/api/Product/1
### Create product
POST {{host}}/api/Product
Content-Type: application/json
{
"name": "Apple",
"description": "string",
"price": 1.2,
"photoUrl": "string",
"categoryId": 1,
"fields": [
{
"id": 1,
"name": "Type",
"value": "Normal",
"categoryId": 1
},
{
"id": 2,
"name": "Colour",
"value": "Green",
"categoryId": 1
}
]
}
### Update product
PUT {{host}}/api/Product/1
Content-Type: application/json
{
"name": "Pinapple",
"description": "string",
"price": 1.2,
"photoUrl": "string",
"categoryId": 1,
"fields": [
{
"id": 1,
"name": "Type",
"value": "Normal",
"categoryId": 1
},
{
"id": 2,
"name": "Colour",
"value": "Green",
"categoryId": 1
}
]
}
### Delete product
DELETE {{host}}/api/Product/2