Sha256: eeec66bc30835ceb88225409c68c9cb9a77eb4b80862fdc8b151f3221aa5fd25

Contents?: true

Size: 364 Bytes

Versions: 11

Compression:

Stored size: 364 Bytes

Contents

module Grape
  module Parser
    module Xml
      class << self
        def call(object, _env)
          MultiXml.parse(object)
        rescue MultiXml::ParseError
          # handle XML parsing errors via the rescue handlers or provide error message
          raise Grape::Exceptions::InvalidMessageBody, 'application/xml'
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
grape-0.19.2 lib/grape/parser/xml.rb
grape-0.19.1 lib/grape/parser/xml.rb
grape-0.19.0 lib/grape/parser/xml.rb
grape-0.18.0 lib/grape/parser/xml.rb
grape-0.17.0 lib/grape/parser/xml.rb
grape-0.16.2 lib/grape/parser/xml.rb
grape-0.16.1 lib/grape/parser/xml.rb
grape-0.15.0 lib/grape/parser/xml.rb
grape-0.14.0 lib/grape/parser/xml.rb
grape-0.13.0 lib/grape/parser/xml.rb
grape-0.12.0 lib/grape/parser/xml.rb