class OpenID::HTTPResponse
Our HTTPResponse class extends Net::HTTPResponse with an additional method, final_url.
Attributes
_response[RW]
final_url[RW]
Public Class Methods
_from_net_response(response, final_url, headers=nil)
click to toggle source
# File lib/openid/fetchers.rb, line 54 def self._from_net_response(response, final_url, headers=nil) me = self.new me._response = response me.final_url = final_url return me end
Public Instance Methods
body=(s)
click to toggle source
# File lib/openid/fetchers.rb, line 65 def body=(s) @_response.instance_variable_set('@body', s) # XXX Hack to work around ruby's HTTP library behavior. @body # is only returned if it has been read from the response # object's socket, but since we're not using a socket in this # case, we need to set the @read flag to true to avoid a bug in # Net::HTTPResponse.stream_check when @socket is nil. @_response.instance_variable_set('@read', true) end
method_missing(method, *args)
click to toggle source
# File lib/openid/fetchers.rb, line 61 def method_missing(method, *args) @_response.send(method, *args) end