-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathrequests.http
50 lines (39 loc) · 972 Bytes
/
requests.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
@jwt = eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyLCJleHAiOjE2NDQxODI5NTJ9._W25rTs_7yb6yy0k3sByYbYjz1lRBDcdPXZ8r_O6g60
### Users create (#)
POST http://localhost:3000/users
Content-Type: application/json
{
"name": "Test name",
"email": "test@test.com",
"password": "password",
"password_confirmation": "password"
}
### Sessions create (login)
POST http://localhost:3000/sessions
Content-Type: application/json
{
"email": "test@test.com",
"password": "password"
}
### Posts index
GET http://localhost:3000/posts
### Posts create
POST http://localhost:3000/posts
Authorization: Bearer {{jwt}}
Content-Type: application/json
{
"title": "Test title",
"body": "Test body"
}
### Posts show
GET http://localhost:3000/posts/1.json
### Posts update
PATCH http://localhost:3000/posts/10
Authorization: Bearer {{jwt}}
Content-Type: application/json
{
"image": "test"
}
### Posts destroy
DELETE http://localhost:3000/posts/10
Authorization: Bearer {{jwt}}