Skip to content

Commit

Permalink
Merge pull request #192 from e8wow/master
Browse files Browse the repository at this point in the history
fix: 支付宝小程序请求header设置与读取headers
  • Loading branch information
wendux authored Mar 12, 2019
2 parents 768c1db + 606e3fe commit 13a813e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/adapter/ap.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ module.exports = function (request, responseCallback) {
method: request.method,
url: request.url,
dataType: 'text',
header: request.headers,
headers: request.headers,
data: request.body || {},
timeout: request.timeout || 20000,
success(res) {
responseCallback({
statusCode: res.status,
responseText: res.data,
statusHeaders: res.headers
headers: res.headers
})
},
fail(res) {
responseCallback({
statusCode: res.status || 0,
responseText: res.data,
statusHeaders: res.headers,
headers: res.headers,
errMsg: statusList[res.status] || ""
})
}
Expand Down

0 comments on commit 13a813e

Please sign in to comment.