Class: Nitro::Service

Inherits:
Controller show all
Defined in:
lib/nitro/service.rb

Overview

A Web Service endpoint. This is a specialized controller.

Direct Known Subclasses

XmlRpcService

Instance Method Summary collapse

Methods inherited from Controller

current, mounted, replace_current

Methods included from Helpers

append_features

Methods included from Caching

included

Methods included from Scaffolding

class_to_list, class_to_method, class_to_path, included

Methods included from Publishable

included

Instance Method Details

#indexObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/nitro/service.rb', line 9

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