1.POST请求头
header: {
"content-type": "application/x-www-form-urlencoded"
},
wx.request({
url: '',
data: '',
header: {
"content-type": "application/x-www-form-urlencoded"
},
method: 'POST',
dataType: 'json',
responseType: 'text',
success: function(res) {
},
fail: function(res) {},
complete: function(res) {},
})
2.GET请求头
header: {
"content-type": "application/json"
},
wx.request({
url: '',
data: '',
header: {
"content-type": "application/json"
},
method: 'GET',
dataType: 'json',
responseType: 'text',
success: function(res) {
},
fail: function(res) {},
complete: function(res) {},
})