Method: IBMCloudSdkCore::BaseService#headers

Defined in:
lib/ibm_cloud_sdk_core/base_service.rb

#headers(headers) ⇒ self

Note:

Chainable

Parameters:

  • headers (Hash)

    Custom headers to be sent with the request

Returns:

  • (self)


121
122
123
124
125
126
# File 'lib/ibm_cloud_sdk_core/base_service.rb', line 121

def headers(headers)
  raise TypeError("Expected Hash type, received #{headers.class}") unless headers.instance_of?(Hash)

  @temp_headers = headers
  self
end