mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-12 00:45:31 +00:00
fixup! Update dependencies.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user