Sha256: 042a1503ac2354751c561c4129144d1eb3f1f167f736c71c4f04c9d37dd65f3f

Contents?: true

Size: 560 Bytes

Versions: 12

Compression:

Stored size: 560 Bytes

Contents

require File.dirname(__FILE__) + '/mixin/response'

module RestClient
  # The response from RestClient looks like a string, but is actually one of
  # these.  99% of the time you're making a rest call all you care about is
  # the body, but on the occassion you want to fetch the headers you can:
  #
  #   RestClient.get('http://example.com').headers[:content_type]
  #
  class Response < String

    include RestClient::Mixin::Response

    def initialize(string, net_http_res)
      @net_http_res = net_http_res
      super(string || "")
    end

  end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
sevenwire-rest-client-0.9.3 lib/restclient/response.rb
sevenwire-rest-client-0.9.4 lib/restclient/response.rb
sevenwire-rest-client-0.9.5 lib/restclient/response.rb
sevenwire-rest-client-0.9.6 lib/restclient/response.rb
rest-client-1.3.1 lib/restclient/response.rb
rest-client-1.3.0 lib/restclient/response.rb
rest-client-next-1.3.0 lib/restclient/response.rb
esod-client-0.2.1 lib/rest-client-1.2.0/lib/restclient/response.rb
esod-client-0.2.0 lib/rest-client-1.2.0/lib/restclient/response.rb
esod-client-0.1.1 lib/rest-client-1.2.0/lib/restclient/response.rb
esod-client-0.1.0 lib/rest-client-1.2.0/lib/restclient/response.rb
rest-client-1.2.0 lib/restclient/response.rb