Sha256: ef8a5c31a64ea45c5d763bfe4cdd4509e4859cb811d9a80033a290573c7b9629
Contents?: true
Size: 913 Bytes
Versions: 3
Compression:
Stored size: 913 Bytes
Contents
# -*- ruby -*- # frozen_string_literal: true require 'libxml' require 'loggability' require 'mongrel2/request' unless defined?( Mongrel2::Request ) # The Mongrel2 XML Request class. Instances of this class represent a request for an XML route from # a Mongrel2 server. class Mongrel2::XMLRequest < Mongrel2::Request extend Loggability # Loggability API -- set up logging under the 'mongrel2' log host log_to :mongrel2 # Mongrel2::Request API -- register this class as handling 'XML' requests register_request_type( self, :XML ) ### Parse the body as JSON. def initialize( sender_id, conn_id, path, headers, body, raw=nil ) super self.log.debug "Parsing XML request body" @reader = LibXML::XML::Reader.string( body ) end ###### public ###### # The parsed request data (a LibXML::Reader object) attr_reader :reader end # class Mongrel2::XMLRequest # vim: set nosta noet ts=4 sw=4:
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongrel2-0.55.0 | lib/mongrel2/xmlrequest.rb |
mongrel2-0.54.0 | lib/mongrel2/xmlrequest.rb |
mongrel2-0.53.0 | lib/mongrel2/xmlrequest.rb |