Skip to content

Commit

Permalink
Merge pull request #34 from meilisearch/set_header_for_content_media_…
Browse files Browse the repository at this point in the history
…type

Add 'application/json' as content media type
  • Loading branch information
eskombro authored Jun 4, 2020
2 parents c2e0e9a + f0c93fa commit 8c3a68b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ func (c Client) sendRequest(req *internalRequest, internalError *Error) (*http.R
return nil, internalError.WithErrCode(ErrCodeRequestCreation, err)
}

// adding apikey to the request
// adding request headers
request.Header.Set("Content-Type", "application/json")
if c.config.APIKey != "" {
request.Header.Set("X-Meili-API-Key", c.config.APIKey)
}
Expand Down

0 comments on commit 8c3a68b

Please sign in to comment.