Class: Mongrel2::XMLRequest

Inherits:
Request
  • Object
show all
Extended by:
Loggability
Defined in:
lib/mongrel2/xmlrequest.rb

Overview

The Mongrel2 XML Request class. Instances of this class represent a request for an XML route from a Mongrel2 server.

Instance Attribute Summary collapse

Attributes inherited from Request

#body, #conn_id, #headers, #path, #raw, #sender_id

Instance Method Summary collapse

Methods inherited from Request

#extended_reply?, #inspect, #is_disconnect?, parse, register_request_type, #remote_ip, #response, response_class, #server_chroot, #socket_id, subclass_for_method, #upload_done?, #upload_headers_match?, #upload_started?, #uploaded_file, #valid_upload?

Constructor Details

#initialize(sender_id, conn_id, path, headers, body, raw = nil) ⇒ XMLRequest

Parse the body as JSON.



23
24
25
26
27
# File 'lib/mongrel2/xmlrequest.rb', line 23

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

Instance Attribute Details

#readerObject (readonly)

The parsed request data (a LibXML::Reader object)



35
36
37
# File 'lib/mongrel2/xmlrequest.rb', line 35

def reader
  @reader
end