-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrequest_examples.http
More file actions
47 lines (41 loc) · 1.47 KB
/
request_examples.http
File metadata and controls
47 lines (41 loc) · 1.47 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
### Regular Call
GET http://localhost:8080/api/rnd/
Accept: application/json
### Call using path versioning
# curl -X GET http://localhost:8080/api/rnd/v2/
# -H "Accept: application/json"
GET http://localhost:8080/api/rnd/v2/
Accept: application/json
### Call deprecated endpoint, using path versioning
# curl -X GET http://localhost:8080/api/rnd/v0.1/
# -H "Accept: application/json"
GET http://localhost:8080/api/rnd/v0.1/
Accept: application/json
### Call using custom header versioning
## -------
## Note: This is for demo purposes only.
## It has to have different URL than the regular API
## Otherwise, it will also intercept calls what do not
## contain Accept-Version header.
## --------
# curl -X GET http://localhost:8080/api/rnd/versioned/
# -H "Accept: application/json"
# -H "Accept-Version: 2"
GET http://localhost:8080/api/rnd/versioned/
Accept: application/json
Accept-Version: 2
### Call using Media Type-based versioning: v3
# curl -X GET http://localhost:8080/api/rnd/
# -H "Accept: application/rnd.v3+json"
GET http://localhost:8080/api/rnd/
Accept: application/rnd.v3+json
### Call using Media Type-based versioning: v4
# curl -X GET http://localhost:8080/api/rnd/
# -H "Accept: application/rnd.v4+json"
GET http://localhost:8080/api/rnd/
Accept: application/rnd.v4+json
### Call using Media Type-based versioning: v5
# curl -X GET http://localhost:8080/api/rnd/
# -H "Accept: application/rnd.v5+json"
GET http://localhost:8080/api/rnd/
Accept: application/rnd.v5+json