Skip to content

Commit

Permalink
Content-Type header is only set if payload is set and payload returns…
Browse files Browse the repository at this point in the history
… a non-empty string.
  • Loading branch information
mbanzon committed Apr 17, 2014
1 parent 504d807 commit 7e257c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simplehttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (r *HTTPRequest) MakeRequest(method string, payload Payload) (*HTTPResponse
return nil, err
}

if payload != nil {
if payload != nil && payload.GetContentType() != "" {
req.Header.Add("Content-Type", payload.GetContentType())
}

Expand Down

0 comments on commit 7e257c0

Please sign in to comment.