mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +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.URL.RawQuery = r.query.Encode()
|
||||
|
||||
req.Header.Add("Accept", "application/json")
|
||||
req.Header.Add("User-Agent", userAgent)
|
||||
|
||||
if r.token != "" {
|
||||
|
|
Loading…
Reference in a new issue