I am trying to access another service by Http to fetch data using HttpClient. The uri should look like endpoint:80/.../itemId.
I am wondering if there is a way to make a batch call to specify a set of itemIds? I did find someone suggests to .setHeader(HttpHeaders.CONNECTION, "keep-alive") when creating request. Via doing this, how could I release the client after getting all data?
Also, seems like this method still need to get one response then send another request? Is this possible to do it as async, and how? BTW, seems like I could not use AsyncHttpClient in this case for some reason.
Since I am barely know nothing about HttpClient, the question may look dumb. Really hope someone could help me solve the problem.
解决方案
API support on the server
There is a small chance that the API supports requesting multiple IDs at a time (e.g. using a URL of t