Sha256: 7d63589c8b231935d4c121a4f4fb6f88a4c6b5bea1b41c5201480fae6e3d02ee
Contents?: true
Size: 1.28 KB
Versions: 12
Compression:
Stored size: 1.28 KB
Contents
module Animoto module HTTPEngines extend Support::DynamicClassLoader dynamic_class_path File.expand_path(File.dirname(__FILE__)) adapter 'Curl' adapter 'NetHTTP' adapter 'Patron' adapter 'RestClient' adapter 'Typhoeus' # @abstract Override {#request} to subclass. class Base # Make a request. # # @abstract # @param [Symbol] method the HTTP method to use, should be lower-case (that is, :get # instead of :GET) # @param [String] url the URL to request # @param [String,nil] body the request body # @param [Hash{String=>String}] headers request headers to send; names will be sent as-is # (for example, use keys like "Content-Type" and not :content_type) # @param [Hash{Symbol=>Object}] options # @option options [Integer] :timeout set a timeout # @option options [String] :username the authentication username # @option options [String] :password the authentication password # @return [Array[Integer,String]] array of status code and response body # @raise [AbstractMethodError] if called on the abstract class def request method, url, body = nil, headers = {}, options = {} raise AbstractMethodError end end end end
Version data entries
12 entries across 12 versions & 1 rubygems