aboutsummaryrefslogtreecommitdiff
path: root/container.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2018-02-11 12:23:16 +0100
committerStefan Majewsky <majewsky@gmx.net>2018-02-11 12:23:16 +0100
commit403359114bf971f037e2737b43e2734a89df9f0a (patch)
tree757c4a2008bb4dabc0f8072b6b357f58308065a7 /container.go
parent9a8ec45e50647e134e5a6e14c3738d6627298b97 (diff)
downloadgo-schwift-403359114bf971f037e2737b43e2734a89df9f0a.tar.gz
ensure that response body is drained
Diffstat (limited to 'container.go')
-rw-r--r--container.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/container.go b/container.go
index 7f5097f..f075d15 100644
--- a/container.go
+++ b/container.go
@@ -123,6 +123,7 @@ func (c *Container) Create(headers ContainerHeaders, opts *RequestOptions) error
Headers: headersToHTTP(headers),
Options: opts,
ExpectStatusCodes: []int{201, 202},
+ DrainResponseBody: true,
}.Do(c.a.client)
if err == nil {
c.Invalidate()
@@ -170,6 +171,7 @@ func (c *Container) EnsureExists() (*Container, error) {
Method: "PUT",
ContainerName: c.name,
ExpectStatusCodes: []int{201, 202},
+ DrainResponseBody: true,
}.Do(c.a.client)
return c, err
}