Class: Utter::Internals::Service
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Utter::Internals::Service
- Defined in:
- lib/utter/service.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#route(verb, path, options = {}, &block) ⇒ Object
response.headers = “*” #response.headers = “POST” p response.headers.inspect end.
Instance Method Details
#route(verb, path, options = {}, &block) ⇒ Object
response.headers = “*” #response.headers = “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
32 33 34 35 36 |
# File 'lib/utter/service.rb', line 32 def route(verb, path, = {}, &block) super signature.to_json # regular json #json signature #NOTE we can use regular json or sinatra/json' end |