class Asana::HttpClient::Response
Internal: Represents a response from the Asana
API.
Attributes
body[R]
Public: Returns the [Hash] representing the parsed JSON body.
faraday_env[R]
Public: Returns a [Faraday::Env] object for debugging.
headers[R]
Public: Returns the [Hash] of attribute headers.
status[R]
Public: Returns the [Integer] status code of the response.
Public Class Methods
new(faraday_response)
click to toggle source
Public: Wraps a Faraday response.
faraday_response - [Faraday::Response] the Faraday response to wrap.
# File lib/asana/http_client/response.rb, line 21 def initialize(faraday_response) @faraday_env = faraday_response.env @status = faraday_env.status @body = faraday_env.body @headers = faraday_response.headers end
Public Instance Methods
to_s()
click to toggle source
Public: Returns a [String] representation of the response.
# File lib/asana/http_client/response.rb, line 30 def to_s "#<Asana::HttpClient::Response status=#{@status} body=#{@body}>" end
Also aliased as: inspect