1
我正在努力处理下面的代码。该请求已发送,但未调用回叫。我也没有错误,但电子邮件发送!你有什么主意吗?执行后不会调用回调没有任何错误
var userPointer = webhook.get("user");
userPointer.fetch().then(function(user){
Parse.Cloud.httpRequest({
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
url: 'https://mandrillapp.com/api/1.0/messages/send-template.json',
body: {
template_name: webhook.get("mandrillTemplateSlug"),
template_content: null,
key: user.get("apiKey"),
message: {
subject: webhook.get("subject"),
from_email: "[email protected]",
from_name: "System",
to: userData
},
async: false
}
},{
success: function(httpResponse) {
console.log(httpResponse);
},
error: function(error){
console.log(error);
}
});
});