我试图在javascript中翻译Pushalot应用程序的api(https://pushalot.com/api),但它并不想工作: 这是我的代码:
var url = 'https://pushalot.com/api/sendmessage';
var request = require('request');
request({
'uri': url,
'method': 'post',
'body' : "push",
'AuthorizationToken=' : token,
'headers' :{ 'content-Length' : data_lenght}
}
,function(error, response, body)
{
if (!error || response.statusCode == 200)
{
console.log("Push envoye : " + command);
callback({'tts' : body});
}
}
请帮帮我!!