Use Result#type instead of setting the header manually when setting content types
This commit is contained in:
parent
6200cefd39
commit
846a7210bd
@ -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");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user