Sha256: 7387a93082d7fbd22956ccca0c8fec3260c7235892dd4073977c4c4205f55ba7

Contents?: true

Size: 395 Bytes

Versions: 9

Compression:

Stored size: 395 Bytes

Contents

require 'nitro/controller'

module Nitro

# A Web Service endpoint. This is a specialized controller.

class Service < Nitro::Controller
  
  def index
    method, args = decode_request(request.raw_body)
  
    res = send(method, *args)
    
    response.content_type = 'text/xml'

    print encode_response(method, res)

    return :stop
  end
  
end

end

# * George Moschovitis <gm@navel.gr>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
nitro-0.23.0 lib/nitro/service.rb
nitro-0.25.0 lib/nitro/service.rb
nitro-0.26.0 lib/nitro/service.rb
nitro-0.24.0 lib/nitro/service.rb
nitro-0.27.0 lib/nitro/service.rb
nitro-0.29.0 lib/nitro/service.rb
nitro-0.28.0 lib/nitro/service.rb
nitro-0.31.0 lib/nitro/service.rb
nitro-0.30.0 lib/nitro/service.rb