class Utter::Internals::Service
Public Instance Methods
route(verb, path, options = {}, &block)
click to toggle source
response.headers["Access-Control-Allow-Methods"] = "*" #response.headers["Access-Control-Allow-Methods"] = "POST" p response.headers.inspect end Makes sure that any response Utter gives back is in JSON format
TODO check if streaming needs a different class if this mechanism doesn't work with it
Calls superclass method
# File lib/utter/service.rb, line 32 def route(verb, path, options = {}, &block) super signature.to_json # regular json #json signature #NOTE we can use regular json or sinatra/json' end