File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -99,20 +99,19 @@ display_results() {
9999 echo " ${BOLD} $( color_response $status ) $res ${RESET} "
100100 if [[ $HEADER_ONLY == 1 ]]; then
101101 echo " HEADER:"
102- echo " $RESPONSE_HEADER " | jq -C
102+ echo " $RESPONSE_HEADER " | jq -C ' . '
103103 else
104104 if [[ $SHOW_HEADER == 1 ]]; then
105105 echo " HEADER:"
106- echo " $RESPONSE_HEADER " | jq -C
106+ echo " $RESPONSE_HEADER " | jq -C ' . '
107107 fi
108108 if [[ $SILENT == 0 ]]; then
109109 echo " BODY:"
110- echo " $RESPONSE_BODY " | jq -C
110+ echo " $RESPONSE_BODY " | jq -C ' . '
111111 fi
112-
113112 fi
114113 echo " META:"
115- echo " $META " | jq -C
114+ echo " $META " | jq -C ' . '
116115}
117116
118117color_response () {
@@ -155,7 +154,7 @@ call_api() {
155154
156155function parse_header() {
157156 local RESPONSE=($( echo " $header " | tr ' \r' ' ' | sed -n 1p) )
158- local header=$( echo " $header " | sed ' 1d;$d' | sed ' s/: /" : "/' | sed ' s/^/"/' | tr ' \r' ' ' | sed ' s/ $/",/' | sed ' 1 s/^/{/' | sed ' $ s/,$/}/' | jq )
157+ local header=$( echo " $header " | sed ' 1d;$d' | sed ' s/: /" : "/' | sed ' s/^/"/' | tr ' \r' ' ' | sed ' s/ $/",/' | sed ' 1 s/^/{/' | sed ' $ s/,$/}/' )
159158 RESPONSE_HEADER=$( echo " $header " " { \" http_version\" : \" ${RESPONSE[0]} \" ,
160159 \" http_status\" : \" ${RESPONSE[1]} \" ,
161160 \" http_message\" : \" ${RESPONSE[@]: 2} \" ,
You can’t perform that action at this time.
0 commit comments