Class: QcloudCos::Http
- Inherits:
-
Object
- Object
- QcloudCos::Http
- Includes:
- HTTMultiParty, HTTParty
- Defined in:
- lib/qcloud_cos/http.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #get(url, options = {}) ⇒ Object
-
#initialize(config) ⇒ Http
constructor
A new instance of Http.
- #post(url, options = {}) ⇒ Object
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
#config ⇒ Object (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, = {}) request('GET', url, ) end |
#post(url, options = {}) ⇒ Object
21 22 23 |
# File 'lib/qcloud_cos/http.rb', line 21 def post(url, = {}) request('POST', url, ) end |