def validate_content_type!(response)
      return unless media_type

      response_content_type = response.content_type
      expected_content_type = Praxis::MediaTypeIdentifier.load(media_type.identifier)

      unless expected_content_type.match(response_content_type)
        raise Exceptions::Validation.new(
          "Bad Content-Type header. #{response_content_type}" +
          " is incompatible with #{expected_content_type} as described in response: #{self.name}"
        )
      end
    end
def validate_content_type!(response)
      return unless media_type

      response_content_type = response.content_type
      expected_content_type = Praxis::MediaTypeIdentifier.load(media_type.identifier)

      unless expected_content_type.match(response_content_type)
        raise Exceptions::Validation.new(
          "Bad Content-Type header. #{response_content_type}" +
          " is incompatible with #{expected_content_type} as described in response: #{self.name}"
        )
      end
    end
Validates Content-Type header and response media type

 @param [Object] response

 @raise [Exceptions::Validation] When there is a missing required header