@@ -46,68 +46,56 @@ httpstat httpbin.org/post -X POST --data-urlencode "a=b" -v
46
46
` httpstat ` has a bunch of environment variables to control its behavior.
47
47
Here are some usage demos, you can also run ` httpstat --help ` to see full explanation.
48
48
49
- <details >
50
- <summary ><strong ><code >HTTPSTAT_SHOW_BODY</code ></strong ></summary >
49
+ - <strong ><code >HTTPSTAT_SHOW_BODY</code ></strong >
51
50
52
- Set to ` true ` to show response body in the output, note that body length
53
- is limited to 1023 bytes, will be truncated if exceeds. Default is ` false ` .
54
- </details >
51
+ Set to ` true ` to show response body in the output, note that body length
52
+ is limited to 1023 bytes, will be truncated if exceeds. Default is ` false ` .
55
53
54
+ - <strong ><code >HTTPSTAT_SHOW_IP</code ></strong >
56
55
57
- < details >
58
- < summary >< strong >< code >HTTPSTAT_SHOW_IP</ code ></ strong ></ summary >
56
+ By default httpstat shows remote and local IP/port address.
57
+ Set to ` false ` to disable this feature. Default is ` true ` .
59
58
60
- By default httpstat shows remote and local IP/port address.
61
- Set to ` false ` to disable this feature. Default is ` true ` .
62
- </details >
59
+ - <strong ><code >HTTPSTAT_SHOW_SPEED</code ></strong >
63
60
61
+ Set to ` true ` to show download and upload speed. Default is ` false ` .
64
62
65
- <details >
66
- <summary ><strong ><code >HTTPSTAT_SHOW_SPEED</code ></strong ></summary >
63
+ ``` bash
64
+ HTTPSTAT_SHOW_SPEED=true httpstat http://cachefly.cachefly.net/10mb.test
65
+
66
+ ...
67
+ speed_download: 3193.3 KiB/s, speed_upload: 0.0 KiB/s
68
+ ```
67
69
68
- Set to ` true ` to show download and upload speed. Default is ` false ` .
70
+ - < strong >< code >HTTPSTAT_SAVE_BODY</ code ></ strong >
69
71
70
- ``` bash
71
- HTTPSTAT_SHOW_SPEED=true httpstat http://cachefly.cachefly.net/10mb.test
72
-
73
- ...
74
- speed_download: 3193.3 KiB/s, speed_upload: 0.0 KiB/s
75
- ```
76
- </details >
77
-
78
-
79
- <details >
80
- <summary ><strong ><code >HTTPSTAT_SAVE_BODY</code ></strong ></summary >
72
+ By default httpstat stores body in a tmp file,
73
+ set to ` false ` to disable this feature. Default is ` true `
81
74
82
- By default httpstat stores body in a tmp file,
83
- set to ` false ` to disable this feature. Default is ` true `
84
- </details >
75
+ - <strong ><code >HTTPSTAT_CURL_BIN</code ></strong >
85
76
77
+ Indicate the cURL bin path to use. Default is ` curl ` from current shell $PATH.
86
78
87
- <details >
88
- <summary ><strong ><code >HTTPSTAT_CURL_BIN</code ></strong ></summary >
79
+ This exampe uses brew installed cURL to make HTTP2 request:
89
80
90
- Indicate the cURL bin path to use. Default is ` curl ` from current shell $PATH.
81
+ ``` bash
82
+ HTTPSTAT_CURL_BIN=/usr/local/Cellar/curl/7.50.3/bin/curl httpstat https://http2.akamai.com/ --http2
83
+
84
+ HTTP/2 200
85
+ ...
86
+ ```
91
87
92
- This exampe uses brew installed cURL to make HTTP2 request:
93
-
94
- ``` bash
95
- HTTPSTAT_CURL_BIN=/usr/local/Cellar/curl/7.50.3/bin/curl httpstat https://http2.akamai.com/ --http2
96
-
97
- HTTP/2 200
98
- ...
99
- ```
88
+ > cURL must be compiled with nghttp2 to enable http2 feature
89
+ > ([ #12 ] ( https://github.com/reorx/httpstat/issues/12 ) ).
100
90
101
- > cURL must be compiled with nghttp2 to enable http2 feature
102
- > ([ #12 ] ( https://github.com/reorx/httpstat/issues/12 ) ).
103
- </details>
91
+ - <strong ><code >HTTPSTAT_METRICS_ONLY</code ></strong >
104
92
93
+ If set to ` true ` , httpstat will only output metrics in json format,
94
+ this is useful if you want to parse the data instead of reading it.
105
95
106
- <details >
107
- <summary ><strong ><code >HTTPSTAT_DEBUG</code ></strong ></summary >
96
+ - <strong ><code >HTTPSTAT_DEBUG</code ></strong >
108
97
109
- Set to ` true ` to see debugging logs. Default is ` false `
110
- </details >
98
+ Set to ` true ` to see debugging logs. Default is ` false `
111
99
112
100
113
101
For convenience, you can export these environments in your ` .zshrc ` or ` .bashrc ` ,
0 commit comments