method
headers_match?
v3.0.9 -
Show latest stable
- Class:
ActiveResource::Request
headers_match?(req)private
No documentation available.
# File activeresource/lib/active_resource/http_mock.rb, line 242
def headers_match?(req)
# Ignore format header on equality if it's not defined
format_header = ActiveResource::Connection::HTTP_FORMAT_HEADER_NAMES[method]
if headers[format_header].present? || req.headers[format_header].blank?
headers == req.headers
else
headers.dup.merge(format_header => req.headers[format_header]) == req.headers
end
end