Class: QcloudCos::Http

Inherits:
Object
  • Object
show all
Includes:
HTTMultiParty, HTTParty
Defined in:
lib/qcloud_cos/http.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Http

Returns a new instance of Http.



13
14
15
# File 'lib/qcloud_cos/http.rb', line 13

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



11
12
13
# File 'lib/qcloud_cos/http.rb', line 11

def config
  @config
end

Instance Method Details

#get(url, options = {}) ⇒ Object



17
18
19
# File 'lib/qcloud_cos/http.rb', line 17

def get(url, options = {})
  request('GET', url, options)
end

#post(url, options = {}) ⇒ Object



21
22
23
# File 'lib/qcloud_cos/http.rb', line 21

def post(url, options = {})
  request('POST', url, options)
end