diff --git a/README.md b/README.md index 3f95e88..65e6e4b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![screenshot](https://codeberg.org/attachments/1cae98c6-0873-41fd-aad0-d33bf495fc50) +![curl-screenshot](https://codeberg.org/attachments/9bdd8005-5eea-4add-89c3-8efc61d06b6f) ![license](https://licensebuttons.net/p/zero/1.0/88x31.png) diff --git a/curl.sh b/curl.sh index 96b902f..4cb6b42 100755 --- a/curl.sh +++ b/curl.sh @@ -66,8 +66,11 @@ curl_cmd="$curl_cmd -o $RESP_BODY_RAW_FILE -D $RESP_HEADERS_FILE" # Execute curl eval "clear" -echo -e "${method} ${url}" +echo -e "\e[0;92mRequest >\e[0m ${method} ${url}" eval $curl_cmd # Copy the raw respone body to a pretty-printed JSON file 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