Skip to content

Commit

Permalink
Make sure we set the content-type
Browse files Browse the repository at this point in the history
we were not setting properly since it was store in pm.contentType
  • Loading branch information
chmouel committed Apr 20, 2023
1 parent 4fd7527 commit f5b0568
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gosmee/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ func (c goSmee) replayData(b []byte) error {
for k, v := range pm.headers {
req.Header.Add(k, v)
}
// add content-type if it's not already set
if _, ok := pm.headers["Content-Type"]; !ok {
req.Header.Add("Content-Type", pm.contentType)
}
resp, err := client.Do(req)
if err != nil {
return err
Expand Down

0 comments on commit f5b0568

Please sign in to comment.