HttpAsyncClient异步报错Request cannot be executed; I/O reactor status: INACTIVE

来源:互联网 发布:淘宝店登陆 编辑:程序博客网 时间:2024/05/22 13:07
You need to start the async client before using it
try (CloseableHttpAsyncClient httpclient = HttpAsyncClients.createDefault()) {
            httpclient.start();

}

Request cannot be executed; I/O reactor status: INACTIVE

    CloseableHttpAsyncClient asyncHttpClient= HttpAsyncClients.createDefault();    asyncHttpClient.start();

异步httpAsyncclient与同步不同,需要在回调之前调用start()方法


阅读全文
0 0
原创粉丝点击