Skip to content

Commit

Permalink
fix: check requestHeader content-type property
Browse files Browse the repository at this point in the history
  • Loading branch information
daern91 committed Apr 1, 2021
1 parent 4974bb7 commit 273cd63
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/sdk-middleware-http/src/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ export default function createHttpMiddleware({
JSON.stringify(request.body || undefined)

const requestHeader: HttpHeaders = { ...request.headers }
if (
!Object.prototype.hasOwnProperty.call(request.headers, 'Content-Type')
) {
if (!Object.prototype.hasOwnProperty.call(requestHeader, 'Content-Type')) {
requestHeader['Content-Type'] = 'application/json'
}
if (body) {
Expand Down

0 comments on commit 273cd63

Please sign in to comment.