Repository navigation
Expand file tree
/
Copy pathrest.http
More file actions
82 lines (38 loc) · 1.31 KB
/
Copy pathrest.http
File metadata and controls
82 lines (38 loc) · 1.31 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
###Get a list of all houses
GET http://localhost:3000/houses
### Create a product
POST http://localhost:3000/houses
Content-Type: application/json
POST http://localhost:3000/houses
Content-Type: application/json
{
"id": 1,
"name": "Your House Name",
"city": "Your House Location", // Assuming location is the city
"state": "Your House State", // Assuming state is the state
"price": "$200/night", // Assuming price is in this format
"value": 200, // Assuming value is the numerical price
"description": "Description of your house",
"photo": "/assets/your-house-photo.webp", // Replace with the actual photo URL
"availableUnits": 3,
"wifi": true,
"laundry": true,
"kitchen": true,
"tv": true,
"patio": false, // Assuming patioBalcony is now just patio
"parking": true,
"pets": false // Assuming petsAllowed is now just pets
}
### GET a product by id
GET http://localhost:3000/houses/(actualidofhouse)
### Update a product by id
PATCH http://localhost:3000/houses/(actualidofhouse)
Content-Type: application/json
{
"parking": false
}
### Delete a product by id
DELETE http://localhost:3000/houses/(actualidofhouse)
### 404 route Not Found
GET http://localhost:3000/abc_xyz
#hrXWgw4Q127uqZJ3