class Imperium::TransactionResponse
A Response
is a decorator around the {www.rubydoc.info/gems/httpclient/HTTP/Message HTTP::Message} object returned when a transaction is made.
It exposes, through a convenient API, headers common to all interactions with the Consul HTTP API
Public Instance Methods
errors()
click to toggle source
Add Errors to the response coerced body
@return the error
# File lib/imperium/transaction_response.rb, line 21 def errors coerced_body['Errors'] end
results()
click to toggle source
Add Results as a KVPair
to the response coerced body
@return Imperium::KVPair
# File lib/imperium/transaction_response.rb, line 12 def results coerced_body['Results'].map do |result| KVPair.new(result['KV']) if result['KV'] end end