-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_tests.http
More file actions
38 lines (30 loc) · 925 Bytes
/
api_tests.http
File metadata and controls
38 lines (30 loc) · 925 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
@StudentResultAPI_HostAddress = http://localhost:5296
### Get all students
GET {{StudentResultAPI_HostAddress}}/api/students
Accept: application/json
### Add a new student
POST {{StudentResultAPI_HostAddress}}/api/students
Content-Type: application/json
{
"name": "John Doe",
"math": 85,
"english": 78,
"science": 92
}
### Get student by ID (Replace {id} with actual ID from previous response)
GET {{StudentResultAPI_HostAddress}}/api/students/{id}
Accept: application/json
### Update student (Replace {id} with actual ID)
PUT {{StudentResultAPI_HostAddress}}/api/students/{id}
Content-Type: application/json
{
"name": "John Doe Updated",
"math": 90,
"english": 88,
"science": 95
}
### Delete student (Replace {id} with actual ID)
DELETE {{StudentResultAPI_HostAddress}}/api/students/{id}
### Search students
GET {{StudentResultAPI_HostAddress}}/api/students/search?name=John
Accept: application/json