mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-10 22:17:44 +00:00
add accept header to request json
This commit is contained in:
parent
455788a9c4
commit
a6abda91a7
1 changed files with 1 additions and 0 deletions
|
@ -51,6 +51,7 @@ func (r *Request) HTTPRequest() (*http.Request, error) {
|
||||||
req, err := http.NewRequest(r.method, r.url, strings.NewReader(r.body.Encode()))
|
req, err := http.NewRequest(r.method, r.url, strings.NewReader(r.body.Encode()))
|
||||||
req.URL.RawQuery = r.query.Encode()
|
req.URL.RawQuery = r.query.Encode()
|
||||||
|
|
||||||
|
req.Header.Add("Accept", "application/json")
|
||||||
req.Header.Add("User-Agent", userAgent)
|
req.Header.Add("User-Agent", userAgent)
|
||||||
|
|
||||||
if r.token != "" {
|
if r.token != "" {
|
||||||
|
|
Loading…
Reference in a new issue