我从我的服务器(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返回到客户端的超时)?