From 51a63c13c827669efb53dd8d65f02d575540cd07 Mon Sep 17 00:00:00 2001 From: Sun Hongliang Date: Wed, 9 Mar 2016 01:01:55 +0800 Subject: [PATCH] fix three swarm api response status code Signed-off-by: Sun Hongliang --- api/handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/handlers.go b/api/handlers.go index 187548efc6..65e9dfb6c4 100644 --- a/api/handlers.go +++ b/api/handlers.go @@ -587,6 +587,7 @@ func postNetworksCreate(c *context, w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(response) } @@ -606,6 +607,7 @@ func postVolumesCreate(c *context, w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(volume) }