From 832bea42526d6c4510036fe1ae227170df12b20d Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Mon, 6 Apr 2026 11:31:39 +0200 Subject: [PATCH] fix: print first response header to CLI (#12) Let's print the first response header in its entirety as opposed to the response code and.. the first word of the response header text. That is the main reason why we do this, let's just print the whole line. Reviewed-on: https://codeberg.org/vlw/curl/pulls/12 --- curl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curl.sh b/curl.sh index 1c66e78..439331f 100755 --- a/curl.sh +++ b/curl.sh @@ -73,4 +73,4 @@ eval $curl_cmd jq . $RESP_BODY_RAW_FILE > $RESP_BODY_JSON_FILE # Print the response code -echo -e -n "\e[0;94mResponse <\e[0m "; awk 'NR==1{print $2, $3; exit}' $RESP_HEADERS_FILE +echo -e -n "\e[0;94mResponse <\e[0m "; head -n 1 $RESP_HEADERS_FILE