Class: Net::HTTP

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/rest-client/lib/rest_client/net_http_ext.rb

Instance Method Summary collapse

Instance Method Details

#__request__Object



12
# File 'lib/vendor/rest-client/lib/rest_client/net_http_ext.rb', line 12

alias __request__ request

#request(req, body = nil, &block) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/vendor/rest-client/lib/rest_client/net_http_ext.rb', line 14

def request(req, body=nil, &block)
	if body != nil && body.respond_to?(:read)
		req.body_stream = body
		return __request__(req, nil, &block)
	else
		return __request__(req, body, &block)
	end
end