# File lib/tire/http/client.rb, line 50 def self.__host_unreachable_exceptions [Errno::ECONNREFUSED, Errno::ETIMEDOUT, ::RestClient::ServerBrokeConnection, ::RestClient::RequestTimeout, SocketError] end
# File lib/tire/http/client.rb, line 34 def self.delete(url) perform ::RestClient.delete(url) rescue *ConnectionExceptions raise rescue ::RestClient::Exception => e Response.new e.http_body, e.http_code end
# File lib/tire/http/client.rb, line 10 def self.get(url, data=nil) perform ::RestClient::Request.new(:method => :get, :url => url, :payload => data).execute rescue *ConnectionExceptions raise rescue ::RestClient::Exception => e Response.new e.http_body, e.http_code end
# File lib/tire/http/client.rb, line 42 def self.head(url) perform ::RestClient.head(url) rescue *ConnectionExceptions raise rescue ::RestClient::Exception => e Response.new e.http_body, e.http_code end
# File lib/tire/http/client.rb, line 18 def self.post(url, data) perform ::RestClient.post(url, data) rescue *ConnectionExceptions raise rescue ::RestClient::Exception => e Response.new e.http_body, e.http_code end
# File lib/tire/http/client.rb, line 26 def self.put(url, data) perform ::RestClient.put(url, data) rescue *ConnectionExceptions raise rescue ::RestClient::Exception => e Response.new e.http_body, e.http_code end