-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest.http
83 lines (67 loc) · 1.58 KB
/
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
##For VSCode Variables
@PORT=4000
@PORT2={{$dotenv PORT}}
###For Doom Emacs Rest Client Variables
:PORT=4000
###Simple request
GET http://localhost:{{PORT2}/element
###Find all elements
GET http://localhost::PORT/element
###Simple POST test request should return Bad Request from pipes
POST http://localhost::PORT/element
Content-Type: application/json
[{
"name":"Test 3",
"connection":[]
}]
###Simple POST test request should return Bad Request from pipes
POST http://localhost::PORT/element HTTP/1.1
Content-Type: application/json
{
"name":"Test",
"connections":[]
}
###Simple POST test request
POST http://localhost::PORT/element
Content-Type: application/json
[{
"name":"Test3",
"connections":[
{
"label":"A29091",
"flow":"input"
},
{
"label":"N23201",
"flow":"input"
}
]
}]
###Update
PATCH http://localhost:3000/element/19 HTTP/1.1
Content-Type: application/json
{
"id":19,
"name":"Test Switchboard Update Test"
}
### Delete
DELETE http://localhost:3000/element/2
### Delete all
DELETE http://localhost:4000/element/
//--------------Connection Entity -------
###Home Request
GET http://localhost:3000/connection
###Get all connections
GET http://localhost:3000/connection/all
### Create Test Connection
POST http://localhost:3000/connection HTTP/1.1
Content-Type: application/json
//This line have to be non written
{
"id":"1",
"label":"A029131"
}
###Delete Testing Connection
DELETE http://localhost::PORT/connection/
###Clean up
DELETE http://localhost:3000/connection/1