Method: CoreLibrary::LoggerHelper.exclude_headers

Defined in:
lib/apimatic-core/utilities/logger_helper.rb

.exclude_headers(headers, headers_to_exclude) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/apimatic-core/utilities/logger_helper.rb', line 52

def self.exclude_headers(headers, headers_to_exclude)
  excluded_headers = {}

  headers.each do |key, val|
    excluded_headers[key] = val unless headers_to_exclude.any? do |excluded_name|
      excluded_name.downcase == key.downcase
    end
  end

  excluded_headers
end