Class: MSG_Chumby::ResetHandler
- Inherits:
-
Mongrel::HttpHandler
- Object
- Mongrel::HttpHandler
- MSG_Chumby::ResetHandler
- Defined in:
- lib/msg-chumby-daemon/http-xml-server.rb
Instance Method Summary collapse
Instance Method Details
#process(request, response) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/msg-chumby-daemon/http-xml-server.rb', line 22 def process(request, response) response.start(200) do |head,out| puts "Received Reset Request." puts "Params: #{request.params}" puts "Body: #{request.body}" head["Content-Type"] = "text/xml" $counter=0 current_time={'time' => [ Time.now.to_i ], 'counter' => [$counter]} out.write(XmlSimple.xml_out( current_time,{'RootName' => "current_time"})); end end |