httputil: Fix incorrect Content-Type header

This commit is contained in:
diamondburned 2022-04-02 22:34:41 -07:00
parent 30c63e66d1
commit 05948ac1ec
No known key found for this signature in database
GPG Key ID: D78C4471CE776659
2 changed files with 1 additions and 3 deletions

View File

@ -140,8 +140,6 @@ func (c *Client) FastRequest(method, url string, opts ...RequestOption) error {
// RequestJSON performs a request and unmarshals the JSON body into "to".
func (c *Client) RequestJSON(to interface{}, method, url string, opts ...RequestOption) error {
opts = PrependOptions(opts, JSONRequest)
r, err := c.Request(method, url, opts...)
if err != nil {
return err

View File

@ -72,7 +72,7 @@ func (r *DefaultRequest) AddQuery(values url.Values) {
func (r *DefaultRequest) AddHeader(header http.Header) {
for key, values := range header {
r.Header[key] = append(r.Header[key], values...)
r.Header[key] = values
}
}