class OAuth::Consumer

Public Instance Methods

get_request(http_method, path, token = nil, request_options = {}, *arguments) click to toggle source
# File core/lib/mikutwitter/oauth_hacks.rb, line 25
def get_request(http_method, path, token = nil, request_options = {}, *arguments)
  unless path.start_with?('/'.freeze)
    @http = create_http(path)
    _uri = URI.parse(path)
    path = "#{_uri.path}#{_uri.query ? "?#{_uri.query}" : ""}" end
  create_signed_request(http_method, path, token, request_options, *arguments) end
request(http_method, path, *arguments, &block) click to toggle source

通信中に例外が発生した場合、コネクションを強制的に切断する

# File core/lib/mikutwitter/oauth_hacks.rb, line 35
def request(http_method, path, *arguments, &block)
  request_ADzX5f8(http_method, path, *arguments, &block)
rescue Exception => e
  @http.finish if defined? @http and @http.started?
  raise e end
Also aliased as: request_ADzX5f8
request_ADzX5f8(http_method, path, *arguments, &block)
Alias for: request