Class: TencentCloud::Common::BaseRequest
- Inherits:
-
Object
- Object
- TencentCloud::Common::BaseRequest
- Defined in:
- lib/tencentcloud-sdk-common/http/request.rb
Overview
base class of http request data
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#header ⇒ Object
Returns the value of attribute header.
-
#host ⇒ Object
Returns the value of attribute host.
-
#is_multipart ⇒ Object
Returns the value of attribute is_multipart.
-
#method ⇒ Object
Returns the value of attribute method.
-
#scheme ⇒ Object
Returns the value of attribute scheme.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(scheme = '', host = '', method = '', uri = '', header = {}, data = nil) ⇒ BaseRequest
constructor
A new instance of BaseRequest.
- #to_s ⇒ Object
Constructor Details
#initialize(scheme = '', host = '', method = '', uri = '', header = {}, data = nil) ⇒ BaseRequest
Returns a new instance of BaseRequest.
49 50 51 52 53 54 55 56 57 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 49 def initialize(scheme = '', host = '', method = '', uri = '', header = {}, data = nil) @scheme = scheme @host = host @method = method @uri = uri @header = header @data = data @is_multipart = false end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
47 48 49 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 47 def data @data end |
#header ⇒ Object
Returns the value of attribute header.
47 48 49 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 47 def header @header end |
#host ⇒ Object
Returns the value of attribute host.
47 48 49 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 47 def host @host end |
#is_multipart ⇒ Object
Returns the value of attribute is_multipart.
47 48 49 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 47 def is_multipart @is_multipart end |
#method ⇒ Object
Returns the value of attribute method.
47 48 49 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 47 def method @method end |
#scheme ⇒ Object
Returns the value of attribute scheme.
47 48 49 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 47 def scheme @scheme end |
#uri ⇒ Object
Returns the value of attribute uri.
47 48 49 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 47 def uri @uri end |
Instance Method Details
#to_s ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/tencentcloud-sdk-common/http/request.rb', line 59 def to_s s = "Host: #{@host}\nMethod: #{method}\nUri: #{@uri}\nHeader: \n" @header ||= {} @header.each do |k, v| s += "#{k}: #{v}\n" end s += "Data: #{@data}\n" end |