-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.http
More file actions
147 lines (110 loc) · 3.01 KB
/
test.http
File metadata and controls
147 lines (110 loc) · 3.01 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
POST http://localhost:3000/api/users
Content-Type: application/json
Accept: application/json
{
"username" : "khannedy",
"password" : "rahasia",
"name" : "Eko Kurniawan"
}
###
POST http://localhost:3000/api/users/login
Content-Type: application/json
Accept: application/json
{
"username" : "khannedy",
"password" : "rahasia"
}
###
GET http://localhost:3000/api/users/current
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
###
PATCH http://localhost:3000/api/users/current
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
{
"name" : "Eko Kurniawan Khannedy"
}
###
DELETE http://localhost:3000/api/users/logout
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
###
POST http://localhost:3000/api/contacts
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
{
"first_name" : "Joko",
"last_name" : "Morro",
"email" : "joko@pzn.com",
"phone" : "324234234234"
}
###
GET http://localhost:3000/api/contacts
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
###
GET http://localhost:3000/api/contacts/317
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
### Update
PUT http://localhost:3000/api/contacts/317
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
{
"first_name": "Rully",
"last_name": "Nugraha",
"email": "rully@pzn.com",
"phone": "324234234234"
}
### Delete Contact
DELETE http://localhost:3000/api/contacts/317
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
### Create Address
POST http://localhost:3000/api/contacts/316/addresses
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
{
"street" : "Kantor",
"city" : "Jakarta",
"province" : "DKI JAKARTA",
"country" : "Indonesia",
"postal_code" : "324234"
}
### List Addresses
GET http://localhost:3000/api/contacts/316/addresses
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
### Get Address
GET http://localhost:3000/api/contacts/316/addresses/46
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
### Update Address
PUT http://localhost:3000/api/contacts/316/addresses/46
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291
{
"street" : "Kantor Bekerja",
"city" : "Bekasi",
"province" : "Jawa Barat",
"country" : "Indonesia",
"postal_code" : "324234"
}
### Remove Address
DELETE http://localhost:3000/api/contacts/316/addresses/46
Content-Type: application/json
Accept: application/json
Authorization: 19dfc22d-4545-45a9-9b36-ec0fc3fee291