【发布时间】:2021-07-24 15:44:07
【问题描述】:
我有一个返回 json 的文件的 http 帖子,然后我使用 .then(function(response){}.... 但是我如何无法获得另一个连续发生的 http 帖子,然后继续第二个。然后? 我想要类似的东西
$http({
method:"POST",
url:"....",
data:{'....}).then(function(response){...})
$http({
method:"POST",
url:"....",
data:{'....}).then(function(response){...})
但是要依赖于它的另一个而不是像下面那样发生异步我想要一些东西
$http({
method:"POST",
url:"....",
data:{'....})First_then().then(function(response){...})
更新
我想明天我会为将来遇到相同问题的每个人发布解决方案,这实际上很简单!
【问题讨论】: