serve JSON http response rw.Header().Set("Content-Type", "application/json") json.NewEncoder(rw).Encode(struct{ Status int json:"status" }{ Status: http.StatusOk })