Class: Instana::Backend::RequestClient::Response

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/instana/backend/request_client.rb

Overview

Since:

  • 1.197.0

Instance Method Summary collapse

Instance Method Details

#jsonHash

Returns the decoded json response.

Returns:

  • (Hash)

    the decoded json response

Since:

  • 1.197.0



27
28
29
# File 'lib/instana/backend/request_client.rb', line 27

def json
  JSON.parse(body)
end

#ok?Boolean

Returns true if the request was successful.

Returns:

  • (Boolean)

    true if the request was successful

Since:

  • 1.197.0



32
33
34
# File 'lib/instana/backend/request_client.rb', line 32

def ok?
  __getobj__.is_a?(Net::HTTPSuccess)
end