Skip to content

Commit

Permalink
Change newRequest helper to ignore empty content type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiante committed Feb 2, 2024
1 parent 336ca5a commit 824212a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion store_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ func newRequest(ctx context.Context, c *resty.Client, contentType string) (*rest

req := c.NewRequest()
req.SetContext(ctx)
req.SetHeader("Accept", contentType)
if contentType != "" {
req.SetHeader("Accept", contentType)
}
claims.SetOnHeader(req.Header)

return req, nil
Expand Down

0 comments on commit 824212a

Please sign in to comment.