@@ -46,68 +46,56 @@ httpstat httpbin.org/post -X POST --data-urlencode "a=b" -v
4646` httpstat ` has a bunch of environment variables to control its behavior.
4747Here are some usage demos, you can also run ` httpstat --help ` to see full explanation.
4848
49- <details >
50- <summary ><strong ><code >HTTPSTAT_SHOW_BODY</code ></strong ></summary >
49+ - <strong ><code >HTTPSTAT_SHOW_BODY</code ></strong >
5150
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 ` .
5553
54+ - <strong ><code >HTTPSTAT_SHOW_IP</code ></strong >
5655
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 ` .
5958
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 >
6360
61+ Set to ` true ` to show download and upload speed. Default is ` false ` .
6462
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+ ```
6769
68- Set to ` true ` to show download and upload speed. Default is ` false ` .
70+ - < strong >< code >HTTPSTAT_SAVE_BODY</ code ></ strong >
6971
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 `
8174
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 >
8576
77+ Indicate the cURL bin path to use. Default is ` curl ` from current shell $PATH.
8678
87- <details >
88- <summary ><strong ><code >HTTPSTAT_CURL_BIN</code ></strong ></summary >
79+ This exampe uses brew installed cURL to make HTTP2 request:
8980
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+ ```
9187
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 ) ).
10090
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 >
10492
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.
10595
106- <details >
107- <summary ><strong ><code >HTTPSTAT_DEBUG</code ></strong ></summary >
96+ - <strong ><code >HTTPSTAT_DEBUG</code ></strong >
10897
109- Set to ` true ` to see debugging logs. Default is ` false `
110- </details >
98+ Set to ` true ` to see debugging logs. Default is ` false `
11199
112100
113101For convenience, you can export these environments in your ` .zshrc ` or ` .bashrc ` ,
0 commit comments