Skip to content

Commit 0c0a89a

Browse files
authored
fix: check requestHeader content-type property (#1674)
1 parent 4974bb7 commit 0c0a89a

File tree

1 file changed

+1
-3
lines changed
  • packages/sdk-middleware-http/src

1 file changed

+1
-3
lines changed

packages/sdk-middleware-http/src/http.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ export default function createHttpMiddleware({
113113
JSON.stringify(request.body || undefined)
114114

115115
const requestHeader: HttpHeaders = { ...request.headers }
116-
if (
117-
!Object.prototype.hasOwnProperty.call(request.headers, 'Content-Type')
118-
) {
116+
if (!Object.prototype.hasOwnProperty.call(requestHeader, 'Content-Type')) {
119117
requestHeader['Content-Type'] = 'application/json'
120118
}
121119
if (body) {

0 commit comments

Comments
 (0)