Class: JSONBroker::Cgi

Inherits:
Object
  • Object
show all
Defined in:
lib/jiji/util/json_broker.rb

Overview

CGI向けAPI パラメータ「request」の値をリクエストとして使う。

Class Method Summary collapse

Class Method Details

.invoke(service) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/jiji/util/json_broker.rb', line 11

def self.invoke( service )
  print "Content-type: application/json\n\n"
  cgi =  CGI.new
  request = cgi.params["request"].to_s

  print Broker.new( service ).invoke( request )
end