class CybridApiId::ApiClient

def select_header_accept(accepts)

Returns:
  • (String) - the Accept header (e.g. application/json)

Parameters:
  • accepts (Array) -- array for Accept
def select_header_accept(accepts)
  return nil if accepts.nil? || accepts.empty?
  # use JSON when present, otherwise use all of the provided
  json_accept = accepts.find { |s| json_mime?(s) }
  json_accept || accepts.join(',')
end