Javascript 使用不含摩卡的Superagent链接请求
这涉及到链接请求,但它使用的是Javascript 使用不含摩卡的Superagent链接请求,javascript,node.js,superagent,Javascript,Node.js,Superagent,这涉及到链接请求,但它使用的是mocha 如何在不使用Mocha或it的情况下链接superagent请求(在end方法中调用另一个restapi) 当我做链子的时候 superagent.post( URL ).send( DATA ).end( function(err,res){ console.log("1"); superagent.post( URL1 ).send( DATA1 ).end( function(err,res){ console.log("2");
mocha
如何在不使用Mocha
或it
的情况下链接superagent
请求(在end方法中调用另一个restapi)
当我做链子的时候
superagent.post( URL ).send( DATA ).end( function(err,res){
console.log("1");
superagent.post( URL1 ).send( DATA1 ).end( function(err,res){
console.log("2");
});
});
控制台上看不到任何一个console.log。我真的不相信第一个console.log不会出现。@djechlin今天,如果没有嵌套,它也不能工作(记得上一个问题吗?)URL是可以通过浏览器访问的,但我得到了响应。@gurvinder372你解决过这个问题吗?我正处于第一个控制台日志将触发的位置,但第二个不会触发