Skip to content

Commit 43c4536

Browse files
authored
Merge pull request #57 from samm-git/override-headers
Allow to override default headers in graphql requests
2 parents 7b67ac3 + 4c7e870 commit 43c4536

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graphql/query_executor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ func queryExecute(ctx context.Context, d *schema.ResourceData, m interface{}, qu
4848
return nil, nil, err
4949
}
5050

51+
req.Header.Set("Content-Type", "application/json; charset=utf-8")
52+
req.Header.Set("Accept", "application/json; charset=utf-8")
5153
for key, value := range headers {
5254
req.Header.Set(key, value.(string))
5355
}
54-
req.Header.Set("Content-Type", "application/json; charset=utf-8")
55-
req.Header.Set("Accept", "application/json; charset=utf-8")
5656

5757
client := &http.Client{}
5858
if logging.IsDebugOrHigher() {

0 commit comments

Comments
 (0)