mirror of https://github.com/docker/docs.git
Merge pull request #318 from vieux/fix_status_code
add missing status codes
This commit is contained in:
commit
45c1efd2c5
|
|
@ -223,6 +223,7 @@ func postContainersCreate(c *context, w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
w.WriteHeader(http.StatusCreated)
|
||||||
fmt.Fprintf(w, "{%q:%q}", "Id", container.Id)
|
fmt.Fprintf(w, "{%q:%q}", "Id", container.Id)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -245,7 +246,7 @@ func deleteContainer(c *context, w http.ResponseWriter, r *http.Request) {
|
||||||
httpError(w, err.Error(), http.StatusInternalServerError)
|
httpError(w, err.Error(), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
w.WriteHeader(http.StatusNoContent)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET /events
|
// GET /events
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue