-
Notifications
You must be signed in to change notification settings - Fork 717
Expand file tree
/
Copy pathExamples.http
More file actions
45 lines (29 loc) · 1.49 KB
/
Examples.http
File metadata and controls
45 lines (29 loc) · 1.49 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
# For more info on HTTP files go to https://aka.ms/vs/httpfile
@baseUrl = http://localhost:5000
### VERSION 1.0
### Weather Forecast - Get All
GET {{baseUrl}}/weatherforecast?api-version=1.0
### MultiVersioned - Legacy v2-only (returns 400 — exact-match on v2.0)
GET {{baseUrl}}/multiversioned/legacy?api-version=1.0
### MultiVersioned - Modern (returns 404 — introduced in v2.0)
GET {{baseUrl}}/multiversioned/modern?api-version=1.0
### Weather Forecast - Remove (Version-Neutral)
DELETE {{baseUrl}}/weatherforecast?api-version=1.0
### VERSION 2.0
### Weather Forecast - Get All
GET {{baseUrl}}/weatherforecast?api-version=2.0
### Weather Forecast - Update
POST {{baseUrl}}/weatherforecast?api-version=2.0
content-type: application/json
{"date":"2026-02-22T15:00:00-08:00","temperatureC":12,"temperatureF":54,"summary":"Chilly"}
### MultiVersioned - Legacy v2-only (200 — exact match)
GET {{baseUrl}}/multiversioned/legacy?api-version=2.0
### MultiVersioned - Modern (200 — introduced in v2.0, reachable from v2.0 onward)
GET {{baseUrl}}/multiversioned/modern?api-version=2.0
### Weather Forecast - Remove (Version-Neutral)
DELETE {{baseUrl}}/weatherforecast?api-version=2.0
### VERSION 3.0
### MultiVersioned - Legacy v2-only (returns 400 — .HasApiVersion(2.0) is exact-match, NOT v3)
GET {{baseUrl}}/multiversioned/legacy?api-version=3.0
### MultiVersioned - Modern (200 — .IntroducedInApiVersion(2.0) is "from v2 onward", auto-reaches v3)
GET {{baseUrl}}/multiversioned/modern?api-version=3.0