class Papertrail::HttpResponse

Used because Net::HTTPOK in Ruby 1.8 has no body= method

Public Class Methods

new(response) click to toggle source
Calls superclass method
# File lib/papertrail/http_client.rb, line 9
def initialize(response)
  super(response)
end

Public Instance Methods

body() click to toggle source
# File lib/papertrail/http_client.rb, line 17
def body
  if __getobj__.body.respond_to?(:force_encoding)
    @body ||= Papertrail::OkJson.decode(__getobj__.body.dup.force_encoding('UTF-8'))
  else
    @body ||= Papertrail::OkJson.decode(__getobj__.body.dup)
  end
end