Javascript 执行后不会调用回调,且不会出现任何错误

Javascript 执行后不会调用回调,且不会出现任何错误,javascript,parse-platform,mandrill,Javascript,Parse Platform,Mandrill,我正在努力学习下面的代码。请求已发送,但未调用回调。我也没有收到任何错误,但电子邮件已发送!你知道吗 var userPointer = webhook.get("user"); userPointer.fetch().then(function(user){ Parse.Cloud.httpRequest({ method: 'POST', headers: { 'Content-Type': 'application/js

我正在努力学习下面的代码。请求已发送,但未调用回调。我也没有收到任何错误,但电子邮件已发送!你知道吗

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: "example@mail.com",
                from_name: "System",
                to: userData
            },
            async: false
         }
    },{
        success: function(httpResponse) {
            console.log(httpResponse);
        },
        error: function(error){
            console.log(error);
        }
    });
});

您已将选项对象分为两个单独的对象:

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: "example@mail.com",
            from_name: "System",
            to: userData
        },
        async: false
    }
}, { // <=== Remove these, replace with just a comma
    success: function(httpResponse) {
        console.log(httpResponse);
    },
    error: function(error) {
        console.log(error);
    }
});
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: "example@mail.com",
            from_name: "System",
            to: userData
        },
        async: false
    },
    success: function(httpResponse) {
        console.log(httpResponse);
    },
    error: function(error) {
        console.log(error);
    }
});