|
util_get_http_status Returns the HTTP server response code returned from fetching a url
package require nstcl-http ?1.0?
package require nstcl ?1.0?::nstcl::util_get_http_status url ?use_get_p? ?timeout?
util_get_http_status returns the remote servers response code (i.e., 200, 404, 503, etc.) from fetching a given url (waiting up to timeout seconds for a response).By default the HTTP GET method is used, because some servers do not return the same response code for HEAD requests. However, a HEAD request requires less bandwidth (since the server may only return the headers and not the actual page). use_get_p can be specified either as a boolean value or as the word HEAD or GET.
http, nstcl