Method: Fog::Connection#request
- Defined in:
- lib/fog/core/connection.rb
#request(params, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/fog/core/connection.rb', line 9 def request(params, &block) unless @persistent reset end unless block_given? if (parser = params.delete(:parser)) body = Nokogiri::XML::SAX::PushParser.new(parser) params[:response_block] = lambda { |chunk, remaining, total| body << chunk } end end response = @excon.request(params, &block) if parser body.finish response.body = parser.response end response end |