From 846a7210bd18b27c74475c749952d85ab7c1a3ba Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Fri, 13 May 2016 23:38:06 -0400 Subject: [PATCH] Use Result#type instead of setting the header manually when setting content types --- .../java/net/frozenorb/apiv3/filters/ContentTypeFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/frozenorb/apiv3/filters/ContentTypeFilter.java b/src/main/java/net/frozenorb/apiv3/filters/ContentTypeFilter.java index 38a5a5a..1f02c07 100644 --- a/src/main/java/net/frozenorb/apiv3/filters/ContentTypeFilter.java +++ b/src/main/java/net/frozenorb/apiv3/filters/ContentTypeFilter.java @@ -7,7 +7,7 @@ import spark.Response; public final class ContentTypeFilter implements Filter { public void handle(Request req, Response res) { - res.header("Content-Type", "application/json"); + res.type("application/json"); } } \ No newline at end of file