Use Result#type instead of setting the header manually when setting content types

This commit is contained in:
Colin McDonald 2016-05-13 23:38:06 -04:00
parent 6200cefd39
commit 846a7210bd

View File

@ -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");
}
}