Class: Rufus::Google::Http

Inherits:
Atom::HTTP
  • Object
show all
Defined in:
lib/rufus/ahttp.rb

Instance Method Summary collapse

Constructor Details

#initialize(auth_token) ⇒ Http

Returns a new instance of Http.



42
43
44
45
46
47
48
49
50
# File 'lib/rufus/ahttp.rb', line 42

def initialize (auth_token)

  @auth_token = auth_token

  super(nil)
  #super({})

  @allow_all_redirects = true
end

Instance Method Details

#http_request(url_s, method, body = nil, headers = {}, www_a = nil, redir_limit = 5) ⇒ Object



52
53
54
55
56
57
58
59
# File 'lib/rufus/ahttp.rb', line 52

def http_request (
  url_s, method, body=nil, headers={}, www_a=nil, redir_limit=5)

  headers['Authorization'] = "GoogleLogin auth=#{@auth_token}"
  headers['GData-Version'] = GDATA_VERSION

  super(url_s, method, body, headers, www_a, redir_limit)
end