句柄102 Node.js中的状态(处理)

时间:2017-11-09 09:18:26

标签: node.js async-await axios koa

我从我的服务器(Node8.9.0LTS)向其他服务发出请求,我收到102 processing状态代码:

    const firstRes = await ajaxService.post('/data/search', params)

    <-- issue a request with a timeout -->

    ctx.data = secondRes.response.data //return the response to the client

ajaxService返回一个使用axios发出请求的异步函数。

我如何编写代码来发出相同的请求,间隔为1秒,限制为5秒(因此我将使用async / await返回到客户端的超时)?

0 个答案:

没有答案