diff options
Diffstat (limited to 'app/app.go')
-rw-r--r-- | app/app.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/app.go b/app/app.go new file mode 100644 index 000000000..8568c7bba --- /dev/null +++ b/app/app.go @@ -0,0 +1,16 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package app + +import ( + "io/ioutil" + "net/http" +) + +func CloseBody(r *http.Response) { + if r.Body != nil { + ioutil.ReadAll(r.Body) + r.Body.Close() + } +} |