Sha256: 30df5d0bf6e93df20106de20d59874b1def535894635cb03102f6915376a45c9

Contents?: true

Size: 540 Bytes

Versions: 39

Compression:

Stored size: 540 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

39 entries across 39 versions & 13 rubygems

Version Path
adamwiggins-rest-client-1.0.1 lib/restclient/response.rb
adamwiggins-rest-client-1.0.2 lib/restclient/response.rb
adamwiggins-rest-client-1.0.3 lib/restclient/response.rb
adamwiggins-rest-client-1.0.4 lib/restclient/response.rb
adamwiggins-rest-client-1.0 lib/restclient/response.rb
auser-poolparty-1.2.10 vendor/gems/rest-client/lib/restclient/response.rb
auser-poolparty-1.2.3 vendor/gems/rest-client/lib/restclient/response.rb
auser-poolparty-1.2.4 vendor/gems/rest-client/lib/restclient/response.rb
auser-poolparty-1.2.7 vendor/gems/rest-client/lib/restclient/response.rb
auser-poolparty-1.2.8 vendor/gems/rest-client/lib/restclient/response.rb
auser-poolparty-1.2.9 vendor/gems/rest-client/lib/restclient/response.rb
auser-rest-client-1.0.1 lib/restclient/response.rb
auser-rest-client-1.0 lib/restclient/response.rb
benschwarz-smoke-0.5.0 vendor/rest-client/lib/restclient/response.rb
benschwarz-smoke-0.5.1 vendor/rest-client/lib/restclient/response.rb
benschwarz-smoke-0.5.2 vendor/rest-client-1.0.1/lib/restclient/response.rb
benschwarz-smoke-0.5.3 vendor/rest-client-1.0.1/lib/restclient/response.rb
benschwarz-smoke-0.5.4 vendor/rest-client-1.0.1/lib/restclient/response.rb
benschwarz-smoke-0.5.5 vendor/rest-client-1.0.1/lib/restclient/response.rb
benschwarz-smoke-0.5.6 vendor/rest-client-1.0.1/lib/restclient/response.rb