Skip to content

Commit

Permalink
fix(taro-alipay): 支付宝小程序网络请求设置默认 content-type, close #1291
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Nov 29, 2018
1 parent 907c3b3 commit 41940ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/taro-alipay/src/native-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,12 @@ function request (options) {
url: options
}
}
const defaultHeaders = {
'Content-Type': 'application/json'
}
options['headers'] = defaultHeaders
if (options['header']) {
options['headers'] = options['header']
options['headers'] = Object.assign({}, options['headers'], options['header'])
delete options['header']
}
const originSuccess = options['success']
Expand Down

0 comments on commit 41940ae

Please sign in to comment.