mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-17 01:17:43 +00:00
fixup! Update dependencies.
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
|||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"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))
|
httpRequest, err := http.NewRequest("POST", g.Endpoint, bytes.NewBuffer(query))
|
||||||
defer httpRequest.Body.Close()
|
|
||||||
// httpRequest.Header.Set("Content-Type", "application/json")
|
// httpRequest.Header.Set("Content-Type", "application/json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
g.Log.Error("Unable to create the request", map[string]interface{}{"_error": err.Error()})
|
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)))
|
return retry.RetryableError(errors.New(fmt.Sprintf("%v", httpResponse.StatusCode)))
|
||||||
}
|
}
|
||||||
|
|
||||||
defer io.Copy(ioutil.Discard, httpResponse.Body)
|
|
||||||
defer httpResponse.Body.Close()
|
defer httpResponse.Body.Close()
|
||||||
|
|
||||||
body, err = ioutil.ReadAll(httpResponse.Body)
|
body, err = ioutil.ReadAll(httpResponse.Body)
|
||||||
|
|||||||
Reference in New Issue
Block a user