-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequests.http
More file actions
37 lines (29 loc) · 803 Bytes
/
requests.http
File metadata and controls
37 lines (29 loc) · 803 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
### Get all rides
GET http://localhost:8080/rides
Accept: application/json
### Get first 5 elements of all rides (page = 0 -> firt page and size=5 -> 5 elements per page and then sort by origin ascending
GET http://localhost:8080/rides?page=0&size=2&sort=origin,asc
### Create ride
POST http://localhost:8080/rides
Content-Type: application/json
{
"origin": "Berlin",
"destination": "Mainz",
"passengerName": "Hans"
}
### Get Specific ride
GET http://localhost:8080/rides/1
Accept: application/json
### Remove ride
DELETE http://localhost:8080/rides/18
### Get all rides
GET http://localhost:8080/rides
Accept: application/json
### Update Ride
PUT http://localhost:8080/rides/1
Content-Type: application/json
{
"origin": "Berlin",
"destination": "Airport",
"passengerName": "Jakob"
}