我正在尝试从requestbin Webhook在线获取json。 但我只想要json格式 如何在Java脚本中提取。
var http = require("http");
var server = http.createServer();
server.listen(8005,'127.0.0.1',function(){
clCloud.login(email,apikey,config.E_PRODUCT.Businesses,callback);
function callback(resp,err){
var _customHeaders = {};
//_customHeaders[config.SANDBOX_MODE_HEADER] = true;
_customHeaders[config.HTTP_CALLBACK] = 'https://webhook.site/aed9f83e-62f8-4956-be29-821d3518cdea'
/* Create a process using raw text */
clCloud.createByText('In computing, real numbers, images, etc.).', _customHeaders,function(resp,err){
if(resp && resp.ProcessId){
console.log('API: create-by-text');
console.log('Process has been created: '+resp.ProcessId);
}
if(!isNaN(err))
console.log('Error: ' + err);
});
}
server.close();
});
process.on("exit", function() {
console.log('Closed process');
});
我在webhook网站上得到输出。但我只需要json输出。