util::link_responding_p (public)
util::link_responding_p [ -url url ] \ [ -list_of_bad_codes list_of_bad_codes ]
Defined in packages/acs-tcl/tcl/http-client-procs.tcl
- Switches:
- -url (optional)
- -list_of_bad_codes (optional, defaults to
"404"
)- Returns:
- 1 if the URL is responding (generally we think that anything other than 404 (not found) is okay).
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if { [catch { set status [util::get_http_status -url $url] } errmsg] } { # got an error; definitely not valid return 0 } else { # we got the page but it might have been a 404 or something if { $status in $list_of_bad_codes } { return 0 } else { return 1 } }XQL Not present: Generic, PostgreSQL, Oracle