aboutsummaryrefslogtreecommitdiffstats
path: root/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'api.go')
-rw-r--r--api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api.go b/api.go
index 7df3332..49b8a61 100644
--- a/api.go
+++ b/api.go
@@ -136,7 +136,7 @@ func respond(w http.ResponseWriter, mode string, resp response) {
w.WriteHeader(code)
switch mode {
- case "json":
+ case "json", "":
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(resp)
@@ -169,7 +169,7 @@ func respond(w http.ResponseWriter, mode string, resp response) {
}
wr.Flush()
- case "", "html":
+ case "html":
w.Header().Set("Content-Type", "text/html")
context := newContext()
context.Result = resp