-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrequest.class.bash
More file actions
69 lines (56 loc) · 1.07 KB
/
request.class.bash
File metadata and controls
69 lines (56 loc) · 1.07 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
@class request
@method construct() {
@var dir "$1"
}
@method get-id() {
@var dir
cat "$dir/_id"
}
@method get() {
@var dir
cat "$dir/raw"
}
@method get-method() {
@var dir
cat "$dir/method"
}
@method get-host() {
@var dir
cat "$dir/host"
}
@method get-uri() {
@var dir
cat "$dir/uri/raw"
}
@method get-uri-path() {
@var dir
cat "$dir/uri/path"
}
@method get-uri-query() {
@var dir
cat "$dir/uri/query"
}
@method get-uri-values() {
@var dir
cat "$dir/uri/values"
}
@method get-headers() {
@var dir
cat "$dir/headers/raw"
}
@method get-headers-values() {
@var dir
cat "$dir/headers/values"
}
@method get-cookies() {
@var dir
cat "$dir/cookies"
}
@method get-body() {
@var dir
cat "$dir/body/raw"
}
@method get-body-values() {
@var dir
cat "$dir/body/values"
}