Advertisement
Guest User

curl test

a guest
May 1st, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.21 KB | None | 0 0
  1. bool isUp(string url) {
  2.     try{
  3.         auto http = HTTP(url);
  4.         http.method = HTTP.Method.head;
  5.         http.perform();
  6.     } catch (CurlException e) {
  7.         return false;
  8.     }
  9.  
  10.     return true;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement