From c5e2c7e618034436c82c82e2ff200728d97eb813 Mon Sep 17 00:00:00 2001 From: Micah Geisel Date: Mon, 9 Nov 2015 16:20:04 -0800 Subject: [PATCH] Fix JSON API sample. --- samples/json_api.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/json_api.cr b/samples/json_api.cr index 6d71523..a10a4e8 100644 --- a/samples/json_api.cr +++ b/samples/json_api.cr @@ -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.set_content_type = "application/json" + env.content_type = "application/json" {name: "Serdar", age: 27}.to_json end