curlで実行時のレスポンスHTTPステータスとBodyを取得したい
方法
/get_https-status_body.sh
#!/bin/bash
response=$(curl -w '\n%{http_code}' -sL --url https://szk302.dev)
echo "status: ${response: -3}"
echo "body: ${response:0:-3}"curlで実行時のレスポンスHTTPステータスとBodyを取得したい
#!/bin/bash
response=$(curl -w '\n%{http_code}' -sL --url https://szk302.dev)
echo "status: ${response: -3}"
echo "body: ${response:0:-3}"