module ApiClient::Dispatcher::Typhoeus
ApiClient::Dispatcher::Typhoeus provides methods to make requests using typhoeus
Public Class Methods
Make a delete request and returns it.
@param [String] url of the api request. @param [Hash] header attributes of the request. @return [Typhoeus::Request] the response object.
# File lib/api-client/dispatcher/typhoeus.rb, line 47 def self.delete(url, header = {}) ::Typhoeus.delete(url, :headers => ApiClient.config.header.merge(header)) end
Make a get request and returns it.
@param [String] url of the api request. @param [Hash] header attributes of the request. @return [Typhoeus::Request] the response object.
# File lib/api-client/dispatcher/typhoeus.rb, line 8 def self.get(url, header = {}) ::Typhoeus.get(url, :headers => ApiClient.config.header.merge(header)) end
Make a patch request and returns it.
@param [String] url of the api request. @param [Hash] args attributes of object. @param [Hash] header attributes of the request. @return [Typhoeus::Request] the response object.
# File lib/api-client/dispatcher/typhoeus.rb, line 38 def self.patch(url, args, header = {}) ::Typhoeus.patch(url, :body => args, :headers => ApiClient.config.header.merge(header)) end
Make a post request and returns it.
@param [String] url of the api request. @param [Hash] args attributes of object. @param [Hash] header attributes of the request. @return [Typhoeus::Request] the response object.
# File lib/api-client/dispatcher/typhoeus.rb, line 18 def self.post(url, args, header = {}) ::Typhoeus.post(url, :body => args, :headers => ApiClient.config.header.merge(header)) end
Make a put request and returns it.
@param [String] url of the api request. @param [Hash] args attributes of object. @param [Hash] header attributes of the request. @return [Typhoeus::Request] the response object.
# File lib/api-client/dispatcher/typhoeus.rb, line 28 def self.put(url, args, header = {}) ::Typhoeus.put(url, :body => args, :headers => ApiClient.config.header.merge(header)) end