From a020f0cede3ed1ecdc0f14178dd96f84d7688bfe Mon Sep 17 00:00:00 2001 From: Cadey Dodrill Date: Thu, 14 Jul 2016 15:59:05 -0700 Subject: [PATCH] Unfuck the api Closes #13 --- ponyapi.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ponyapi.nim b/ponyapi.nim index 00e0da7..1f9a7b8 100644 --- a/ponyapi.nim +++ b/ponyapi.nim @@ -59,9 +59,9 @@ template httpReply(code, body: expr): expr = ## Make things a lot simpler for replies, etc. if request.headers.getOrDefault("X-API-Options") == "bare" or @"options" == "bare": # New "bare" reply format, easier to scrape, etc. - resp code, "application/json", pretty(%body, 4) + resp code, pretty(%body, 4), "application/json" else: - resp code, "application/json", pretty(%%body, 4) + resp code, pretty(%%body, 4), "application/json" settings: port = 5000.Port