Merge pull request #9 from botandrose/patch-1

Fix JSON API sample
This commit is contained in:
Serdar Dogruyol 2015-11-10 10:58:49 +02:00
commit d280dd7f87

View file

@ -4,6 +4,6 @@ require "json"
# You can easily access the context and set content_type like 'application/json'. # You can easily access the context and set content_type like 'application/json'.
# Look how easy to build a JSON serving API. # Look how easy to build a JSON serving API.
get "/" do |env| get "/" do |env|
env.set_content_type = "application/json" env.content_type = "application/json"
{name: "Serdar", age: 27}.to_json {name: "Serdar", age: 27}.to_json
end end