Merge pull request #71 from stephan-nordnes-eriksen/patch-1
Updating json sample
This commit is contained in:
commit
69fd844008
|
@ -4,6 +4,6 @@ require "json"
|
|||
# You can easily access the context and set content_type like 'application/json'.
|
||||
# Look how easy to build a JSON serving API.
|
||||
get "/" do |env|
|
||||
env.content_type = "application/json"
|
||||
env.response.content_type = "application/json"
|
||||
{name: "Serdar", age: 27}.to_json
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue