-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.http
81 lines (64 loc) · 1.55 KB
/
test.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
### Create category 1
POST http://localhost:8080/api/categories
Accept: application/json
Content-Type: application/json
{
"name": "webinar",
"slug": "webinar"
}
### Create category 2
POST http://localhost:8080/api/categories
Accept: application/json
Content-Type: application/json
{
"name": "Minat Bakat"
}
### Update category 1
PUT http://localhost:8080/api/categories/2
Accept: application/json
Content-Type: application/json
{
"name": "Minat Bakat 2",
"slug": "minat-bakat-2"
}
### Update category 2
PUT http://localhost:8080/api/categories/2
Accept: application/json
Content-Type: application/json
{
"name": "Minat Bakat 3"
}
### Get category
GET http://localhost:8080/api/categories/1
Accept: application/json
### Get category Not Found
GET http://localhost:8080/api/categories/999
Accept: application/json
### Get category Not ID
GET http://localhost:8080/api/categories/hehe
Accept: application/json
### List of Categories
GET http://localhost:8080/api/categories
Accept: application/json
### Create shortener 1
POST http://localhost:8080/api/shorteners
Accept: application/json
Content-Type: application/json
{
"real_url": "https://aryahmph.dev",
"slug": "aryahmph"
}
### Create shortener 2
POST http://localhost:8080/api/shorteners
Accept: application/json
Content-Type: application/json
{
"real_url": "not url",
"slug": "NotURL"
}
### Get shortener by slug
GET http://localhost:8080/api/shorteners/aryahmph
Accept: application/json
### Get shortener by slug not found
GET http://localhost:8080/api/shorteners/NotURL
Accept: application/json