From 403359114bf971f037e2737b43e2734a89df9f0a Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Sun, 11 Feb 2018 12:23:16 +0100 Subject: ensure that response body is drained --- container.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'container.go') 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 } -- cgit v1.2.3