class HttpResponse
HTTP Response Class (HTTPレスポンス クラス)
@!attribute [r] header
@return [Hash] http response headers (HTTPレスポンス・ヘッダ)
@!attribute [r] body
@return [Hash] http response body (HTTPレスポンス・ボディ)
Attributes
body[R]
header[R]
Public Class Methods
new(response)
click to toggle source
initializer (イニシャライザ) @param [Faraday::Response] response http response (HTTPレスポンス)
# File lib/growthpush/http_response.rb, line 18 def initialize(response) @response = response @header = response.headers @body = response.body end
Public Instance Methods
ok?()
click to toggle source
return result of http request (HTTPリクエストの成否を返す) @return [TrueClass,FalseClass] result (成否)
# File lib/growthpush/http_response.rb, line 28 def ok? @response.success? end