def exists?(path)
      path = @uri.merge(path).path
      headers = {'Depth' => '1'}
      body = '<?xml version="1.0" encoding="utf-8"?><DAV:propfind xmlns:DAV="DAV:"><DAV:allprop/></DAV:propfind>'
      begin
        res = @handler.request(:propfind, path, body, headers.merge(@headers))
      rescue
        return false
      end
      return (res.is_a? Net::HTTPSuccess)
    end
def exists?(path)
      path = @uri.merge(path).path
      headers = {'Depth' => '1'}
      body = '<?xml version="1.0" encoding="utf-8"?><DAV:propfind xmlns:DAV="DAV:"><DAV:allprop/></DAV:propfind>'
      begin
        res = @handler.request(:propfind, path, body, headers.merge(@headers))
      rescue
        return false
      end
      return (res.is_a? Net::HTTPSuccess)
    end
Returns true if resource exists on server.

 Example:
   dav.exists?('https://www.example.com/collection/')  => true
   dav.exists?('/collection/')  => true