diff --git a/CHANGELOG.md b/CHANGELOG.md index 637267c..1308d1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog -## 0.6.0 +## 0.6.1 +* Set Accept header to application/json +## 0.6.0 * Add version to User-Agent header * Add WithUserAgent option to enable customization of the User-Agent header diff --git a/scryfall.go b/scryfall.go index 07ce887..b1de962 100644 --- a/scryfall.go +++ b/scryfall.go @@ -16,7 +16,7 @@ import ( ) const ( - Version = "0.6.0" + Version = "0.6.1" defaultBaseURL = "https://api.scryfall.com" defaultUserAgent = "go-scryfall/" + Version @@ -223,6 +223,8 @@ func NewClient(options ...ClientOption) (*Client, error) { func (c *Client) doReq(ctx context.Context, req *http.Request, respBody interface{}) error { req.Header.Set("User-Agent", c.userAgent) + req.Header.Set("Accept", "application/json") + if len(c.authorization) != 0 { req.Header.Set("Authorization", c.authorization) }