File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 55# This source code is licensed under the BSD-style license found in the
66# LICENSE file in the root directory of this source tree.
77
8+ set -x
9+
10+ url=" https://www.cadence.com/en_US/home.html"
11+ request_id=$( curl -sS -H ' Accept: application/json' \
12+ " https://check-host.net/check-http?host=$url &max_nodes=1&node=us3.node.check-host.net" \
13+ | jq -r .request_id)
14+ curl -sS -H ' Accept: application/json' " https://check-host.net/check-result/$request_id "
15+
816set -euo pipefail
917
1018status=0
@@ -21,14 +29,6 @@ while IFS=: read -r filepath url; do
2129 if [ " $code " -ge 400 ]; then
2230 code=$( curl -gsLm30 -o /dev/null -w " %{http_code}" -r 0-0 -A " $user_agent " " $url " ) || code=000
2331 fi
24- if [ " $code " -ge 400 ]; then
25- request_id=$( curl -sS -H ' Accept: application/json' \
26- " https://check-host.net/check-http?host=$url &max_nodes=1&node=us3.node.check-host.net" \
27- | jq -r .request_id)
28- code=$( curl -sS -H ' Accept: application/json' \
29- " https://check-host.net/check-result/$request_id " \
30- | jq -r ' ."us3.node.check-host.net"[0][3]' || echo 000)
31- fi
3232 if [ " $code " -ge 200 ] && [ " $code " -lt 400 ]; then
3333 printf " ${green} %s${reset} ${cyan} %s${reset} \n" " $code " " $url "
3434 else
You can’t perform that action at this time.
0 commit comments