Ping from AppEngine
I know I can fetch url from AppEngine. But I just want to ping a website, without to get any other开发者_运维百科 data. Is it possible?
"ping" as in ICMP or "ping" as in send an HTTP request without getting the full response? If the latter, just send a HEAD request instead of a GET.
If the former, then that probably depends on your language of choice on AppEngine
- For python, check out Ping a site in Python?
- For java, check out http://blog.taragana.com/index.php/archive/how-to-do-icmp-ping-in-java-jdk-15-and-above/
There is a whitelist of modules and an FAQ about notable exclusions. You can't do it; use whaley's HEAD request.
It is also possible for an ICMP un-pingable to serve web-pages and a ICMP pingable site to do nothing but respond to pings.
精彩评论