-
Notifications
You must be signed in to change notification settings - Fork 16
/
http-prompt.tui.txt
84 lines (53 loc) · 4.53 KB
/
http-prompt.tui.txt
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
HTTP-PROMPT
VERSION ==> #0.11.0
#TUI above httppie
#Add concept of environment, history
#Add autocompletion, including with Swagger
CONFIG ==> #Is ~/.config/http-prompt/config.py
OPTS #Any httpie options, including URL, --OPT=VAL, QUERY_VAR==VAL, HEADER:VAL, etc.
/=+===============================+=\
/ : : \
)==: MAIN :==(
\ :_______________________________: /
\=+===============================+=/
http-prompt [OPTS] #Starts prompt
METHOD [OPTS] #Fires request
CTRL-D
exit #
/=+===============================+=\
/ : : \
)==: ENVIRONMENT :==(
\ :_______________________________: /
\=+===============================+=/
ENVIRONMENT ==> #Sets of httpie options currently used.
#Remain accross requests.
#Saved to filesystem to ~/.local/share/http-prompt/context.hp, i.e. remains accross invocations.
cd PATH #Changes current URL. Can be absolute or relative.
OPTS #Change current environment
rm -h|q|b|o ... #Remove part of environment: header|queryvar|bodyvar|flag
rm * #Clear whole environment
httpie [METHOD] #Show how the httpie request currenly looks like
env #Another way to show environment, but line by line
http-prompt --env FILE
source FILE #Loads a FILE saved via env > FILE
exec FILE #Same but do rm * first
/=+===============================+=\
/ : : \
)==: SHELL :==(
\ :_______________________________: /
\=+===============================+=/
> FILE
>> FILE
| COMMAND #Can be used with METHOD|httpie|env
`COMMAND` #Shell substitution
/=+===============================+=\
/ : : \
)==: OTHERS :==(
\ :_______________________________: /
\=+===============================+=/
HISTORY ==> #Saved to ~/.local/share/http-prompt/history
http-prompt --spec JSON_FILE|URI #Use a Swagger spec, to allow for URL path autocompletion
ls #Show possible URL paths
VIM KEYBINDINGS ==> #Can be Vim key bindings with a config option