Class: TencentCloud::Common::HttpProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/tencentcloud-sdk-common/profile/http_profile.rb

Overview

basic httpprofile

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scheme = 'https', endpoint = nil, req_method = 'POST', req_timeout = 60, keep_alive = false, proxy = nil) ⇒ HttpProfile

Initializes a new HttpProfile with default values

Parameters:

  • scheme (String) (defaults to: 'https')

    the protocol scheme (default: 'https')

  • endpoint (String, nil) (defaults to: nil)

    the API endpoint (default: nil)

  • req_method (String) (defaults to: 'POST')

    the HTTP request method (default: 'POST')

  • req_timeout (Integer) (defaults to: 60)

    the request timeout in seconds (default: 60)

  • keep_alive (Boolean) (defaults to: false)

    whether to keep the connection alive (default: false)

  • proxy (String, nil) (defaults to: nil)

    the proxy server (default: nil)



17
18
19
20
21
22
23
24
25
# File 'lib/tencentcloud-sdk-common/profile/http_profile.rb', line 17

def initialize(scheme = 'https', endpoint = nil, req_method = 'POST',
               req_timeout = 60, keep_alive = false, proxy = nil)
  @scheme = scheme
  @endpoint = endpoint
  @req_method = req_method
  @req_timeout = req_timeout
  @keep_alive = keep_alive
  @proxy = proxy
end

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/http_profile.rb', line 7

def endpoint
  @endpoint
end

#keep_aliveObject

Returns the value of attribute keep_alive.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/http_profile.rb', line 7

def keep_alive
  @keep_alive
end

#proxyObject

Returns the value of attribute proxy.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/http_profile.rb', line 7

def proxy
  @proxy
end

#req_methodObject

Returns the value of attribute req_method.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/http_profile.rb', line 7

def req_method
  @req_method
end

#req_timeoutObject

Returns the value of attribute req_timeout.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/http_profile.rb', line 7

def req_timeout
  @req_timeout
end

#schemeObject

Returns the value of attribute scheme.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/http_profile.rb', line 7

def scheme
  @scheme
end