class Fauna::RequestResult

The result of a request. Provided to observers and included within errors.

Attributes

client[R]

The Client.

end_time[R]

Time the response was received.

method[R]

HTTP method. Either :get, :post, :put, :patch, or :delete

path[R]

Path that was queried. Relative to client's domain.

query[R]

URL query. nil except for GET requests.

request_content[R]

Request data.

response_content[R]

Parsed value returned by the server. Includes “resource” wrapper hash, or may be an “errors” hash instead. In the case of a JSON parse error, this will be nil.

response_headers[R]

A hash of headers.

response_raw[R]

String value returned by the server.

start_time[R]

Time the request started.

status_code[R]

HTTP status code.

Public Instance Methods

auth() click to toggle source

Credentials used by the client.

# File lib/fauna/request_result.rb, line 54
def auth
  client.credentials
end
time_taken() click to toggle source

Real time spent performing the request.

# File lib/fauna/request_result.rb, line 49
def time_taken
  end_time - start_time
end