From d81f12945b08ff1cd283a08292d501abb1e99fff Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Sat, 7 Oct 2017 13:51:44 +1100 Subject: [PATCH] feat: convert paths ending in .json to Accept: application/hal+json --- lib/rack/pact_broker/convert_file_extension_to_accept_header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/pact_broker/convert_file_extension_to_accept_header.rb b/lib/rack/pact_broker/convert_file_extension_to_accept_header.rb index cde98d938..c6a34ea62 100644 --- a/lib/rack/pact_broker/convert_file_extension_to_accept_header.rb +++ b/lib/rack/pact_broker/convert_file_extension_to_accept_header.rb @@ -7,7 +7,7 @@ module PactBroker class ConvertFileExtensionToAcceptHeader - EXTENSIONS = {".csv" => "text/csv", ".svg" => "image/svg+xml"} + EXTENSIONS = {".csv" => "text/csv", ".svg" => "image/svg+xml", ".json" => "application/hal+json"} EXTENSION_REGEXP = /\.\w+$/ def initialize app