Class: Rack::OauthProxy::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/oauth_proxy/client.rb,
lib/rack/oauth_proxy/client/request.rb

Defined Under Namespace

Classes: NoUrlError, Request

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



9
10
11
# File 'lib/rack/oauth_proxy/client.rb', line 9

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/rack/oauth_proxy/client.rb', line 7

def options
  @options
end

Instance Method Details

#fetch(env) ⇒ Object



13
14
15
16
# File 'lib/rack/oauth_proxy/client.rb', line 13

def fetch(env)
  request = Request.new(env, options)
  connection.get(url, request.params, request.header)
end