Sha256: a74efa4a81fb530dbfa84ed7775bdafd2ba3b30945c78ead1b8e3f4584042caa

Contents?: true

Size: 397 Bytes

Versions: 4

Compression:

Stored size: 397 Bytes

Contents

module Faraday
  class Request
    class XML < Faraday::Middleware
      dependency 'active_support/all'

      def initialize(app, options={})
        @app     = app
        @options = options
      end

      def call(env)
        if env[:method] == :post
          env[:body] = env[:body].to_xml(:root => env[:body].delete(:root))
        end

        @app.call(env)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
openfire-ruby-0.1.2 lib/faraday/request/xml.rb
openfire-ruby-0.1.1 lib/faraday/request/xml.rb
openfire-ruby-0.1.0 lib/faraday/request/xml.rb
letsfreckle-client-0.2.1 lib/faraday/request/xml.rb