Class: Aliyun::Odps::Http
- Inherits:
-
Object
- Object
- Aliyun::Odps::Http
- Includes:
- HTTParty
- Defined in:
- lib/aliyun/odps/http.rb
Overview
nodoc
Defined Under Namespace
Classes: BetterXmlParser
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #delete(uri, options = {}) ⇒ Object
- #get(uri, options = {}) ⇒ Object
- #head(uri, options = {}) ⇒ Object
-
#initialize(config) ⇒ Http
constructor
A new instance of Http.
- #options(uri, options = {}) ⇒ Object
- #post(uri, options = {}) ⇒ Object
- #put(uri, options = {}) ⇒ Object
Constructor Details
#initialize(config) ⇒ Http
Returns a new instance of Http.
23 24 25 |
# File 'lib/aliyun/odps/http.rb', line 23 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
21 22 23 |
# File 'lib/aliyun/odps/http.rb', line 21 def config @config end |
Instance Method Details
#delete(uri, options = {}) ⇒ Object
41 42 43 44 |
# File 'lib/aliyun/odps/http.rb', line 41 def delete(uri, = {}) headers = default_content_type.merge([:headers] || {}) request('DELETE', uri, .merge(headers: headers)) end |
#get(uri, options = {}) ⇒ Object
27 28 29 |
# File 'lib/aliyun/odps/http.rb', line 27 def get(uri, = {}) request('GET', uri, ) end |
#head(uri, options = {}) ⇒ Object
50 51 52 |
# File 'lib/aliyun/odps/http.rb', line 50 def head(uri, = {}) request('HEAD', uri, ) end |
#options(uri, options = {}) ⇒ Object
46 47 48 |
# File 'lib/aliyun/odps/http.rb', line 46 def (uri, = {}) request('OPTIONS', uri, ) end |
#post(uri, options = {}) ⇒ Object
36 37 38 39 |
# File 'lib/aliyun/odps/http.rb', line 36 def post(uri, = {}) headers = default_content_type.merge([:headers] || {}) request('POST', uri, .merge(headers: headers)) end |
#put(uri, options = {}) ⇒ Object
31 32 33 34 |
# File 'lib/aliyun/odps/http.rb', line 31 def put(uri, = {}) headers = default_content_type.merge([:headers] || {}) request('PUT', uri, .merge(headers: headers)) end |