我有一个API,它有时由于某些依赖项而不返回响应。我需要等待最多15秒的响应,如果15秒内没有收到任何响应,我想跳过它,让控件转到下一行执行下一组指令。下面是API调用的方式: const response = await getData() // I want to await maxseconds here, if no
我有一个grails 3应用程序,它使用grails.plugins.rest.client插件调用另一个API.The api,执行一些操作并在40到50秒内做出响应。我如何更改超时以等待响应60秒。我的代码如下:import grails.plugins.rest.client.RestResponseprivate R
api,对响应进行处理,而不返回任何内容。// Do further task after this which is not dependent on response of A or B编译器对A和B方法发出以下警告:
由于没有等待此调用我不需要从A或B方法返回任何响应,所以我想在A()和B()前面省略“等待”关键字,因为我想在A和B调用之后执行代码"