|
@@ -535,14 +535,7 @@ func postContainersCreate(srv *Server, version float64, w http.ResponseWriter, r
|
|
|
out.Warnings = append(out.Warnings, "IPv4 forwarding is disabled.")
|
|
|
}
|
|
|
|
|
|
- b, err := json.Marshal(out)
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
- w.Header().Set("Content-Type", "application/json")
|
|
|
- w.WriteHeader(http.StatusCreated)
|
|
|
- w.Write(b)
|
|
|
- return nil
|
|
|
+ return writeJSON(w, http.StatusCreated, out)
|
|
|
}
|
|
|
|
|
|
func postContainersRestart(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|