diff options
Diffstat (limited to 'api/server/httputils/httputils_write_json.go')
| -rw-r--r-- | api/server/httputils/httputils_write_json.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/api/server/httputils/httputils_write_json.go b/api/server/httputils/httputils_write_json.go deleted file mode 100644 index 148dd038b3..0000000000 --- a/api/server/httputils/httputils_write_json.go +++ /dev/null @@ -1,15 +0,0 @@ -package httputils // import "github.com/docker/docker/api/server/httputils" - -import ( - "encoding/json" - "net/http" -) - -// WriteJSON writes the value v to the http response stream as json with standard json encoding. -func WriteJSON(w http.ResponseWriter, code int, v interface{}) error { - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(code) - enc := json.NewEncoder(w) - enc.SetEscapeHTML(false) - return enc.Encode(v) -} |
