}
json_data, err := json.Marshal(data)
- response.Header().Set("Content-Type", "text/json")
+ response.Header().Set("Content-Type", "application/json")
if err != nil {
io.WriteString(response, "{\"error\":\"-9\",\"message\":\"Internal encoding error\"}")
} else {
}
func okResponse(response http.ResponseWriter, data interface{}) {
- response.Header().Set("Content-Type", "text/json")
+ response.Header().Set("Content-Type", "application/json")
json_data, err := json.Marshal(data)
if err != nil {
errorResponse(response, "Internal encoding error")