Class: Mongrel2::XMLRequest
- 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
-
#reader ⇒ Object
readonly
The parsed request data (a LibXML::Reader object).
Attributes inherited from Request
#body, #conn_id, #headers, #path, #raw, #sender_id
Instance Method Summary collapse
-
#initialize(sender_id, conn_id, path, headers, body, raw = nil) ⇒ XMLRequest
constructor
Parse the body as JSON.
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
#reader ⇒ Object (readonly)
The parsed request data (a LibXML::Reader object)
35 36 37 |
# File 'lib/mongrel2/xmlrequest.rb', line 35 def reader @reader end |