forked from woowacourse/jwp-subway-path
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttp-request.http
84 lines (55 loc) · 1.27 KB
/
http-request.http
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
83
84
### 노선 생성
POST http://localhost:8080/lines
Content-Type: application/json
{
"name": "2호선",
"color": "GREEN"
}
### 노선 전체 조회
GET http://localhost:8080/lines
Content-Type: application/json
### 노선 단일 조회
GET http://localhost:8080/lines/1
Content-Type: application/json
### 노선 정보 수정
PUT http://localhost:8080/lines/1
Content-Type: application/json
{
"name": "3호선",
"color": "ORANGE"
}
### 노선 삭제
DELETE http://localhost:8080/lines/1
Content-Type: application/json
### 노선에 역 추가
POST http://localhost:8080/lines/1/stations
Content-Type: application/json
{
"upStationId": 1,
"downStationId": 2,
"distance": 15
}
### 노선에서 역 제거
DELETE http://localhost:8080/lines/1/stations/1
Content-Type: application/json
### 역 생성
POST http://localhost:8080/stations
Content-Type: application/json
{
"name": "역삼역"
}
### 역 전체 조회
GET http://localhost:8080/stations
Content-Type: application/json
### 역 단일 조회
GET http://localhost:8080/stations/1
Content-Type: application/json
### 역 수정
PUT http://localhost:8080/stations/1
Content-Type: application/json
{
"name": "삼성역"
}
### 역 제거
DELETE http://localhost:8080/stations/1
Content-Type: application/json