class PactBroker::Api::Decorators::WebhookExecutionResultDecorator::HTTPResponseDecorator

Public Instance Methods

body() click to toggle source
# File lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb, line 50
def body
  begin
    ::JSON.parse(represented.body)
  rescue StandardError => _ex
    represented.body
  end
end
headers() click to toggle source
# File lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb, line 43
def headers
  headers_hash = represented.to_hash
  headers_hash.keys.each_with_object({}) do | name, new_headers_hash|
    new_headers_hash[name] = headers_hash[name].join(", ")
  end
end