class PactBroker::Api::Decorators::WebhookExecutionResultDecorator::HTTPRequestDecorator

Public Instance Methods

body() click to toggle source
# File lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb, line 25
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 18
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
url() click to toggle source
# File lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb, line 33
def url
  (represented.uri || represented.path).to_s
end