From 277ef212637eea7de8e5603a55d0c9b74dadf164 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Mon, 5 Dec 2022 12:09:42 +0000 Subject: [PATCH] fixup! Update dependencies. --- query.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/query.go b/query.go index 7f7989a..3669877 100644 --- a/query.go +++ b/query.go @@ -6,7 +6,6 @@ import ( "crypto/md5" "errors" "fmt" - "io" "io/ioutil" "net/http" @@ -66,7 +65,6 @@ func (g *GraphQL) Query(queryContent string, queryVariables interface{}, queryHe } httpRequest, err := http.NewRequest("POST", g.Endpoint, bytes.NewBuffer(query)) - defer httpRequest.Body.Close() // httpRequest.Header.Set("Content-Type", "application/json") if err != nil { g.Log.Error("Unable to create the request", map[string]interface{}{"_error": err.Error()}) @@ -89,7 +87,6 @@ func (g *GraphQL) Query(queryContent string, queryVariables interface{}, queryHe return retry.RetryableError(errors.New(fmt.Sprintf("%v", httpResponse.StatusCode))) } - defer io.Copy(ioutil.Discard, httpResponse.Body) defer httpResponse.Body.Close() body, err = ioutil.ReadAll(httpResponse.Body)