class Crowi::Response
Public Class Methods
new(faraday_response)
click to toggle source
# File lib/crowi/response.rb, line 3 def initialize(faraday_response) @raw_body = faraday_response.body @raw_headers = faraday_response.headers @raw_status = faraday_response.status end
Public Instance Methods
body()
click to toggle source
# File lib/crowi/response.rb, line 9 def body @raw_body end
headers()
click to toggle source
# File lib/crowi/response.rb, line 13 def headers @headers ||= @raw_headers.inject({}) do |result, (key, value)| result.merge(key.split("-").map(&:capitalize).join("-") => value) end end
status()
click to toggle source
# File lib/crowi/response.rb, line 19 def status @raw_status end