Output correct content-type with API responses.

Fixes #281
This commit is contained in:
Victor Marmol 2014-10-27 08:32:50 -07:00
parent b1796da270
commit 9961e0f4d6

View File

@ -191,6 +191,7 @@ func writeResult(res interface{}, w http.ResponseWriter) error {
return fmt.Errorf("failed to marshall response %+v with error: %s", res, err)
}
w.Header().Set("Content-Type", "application/json")
w.Write(out)
return nil
}