I send two request and I want do second request with cookie (cookie from response from first request).
How it work now:
Future<Response> f = asyncHttpClient
.prepareGet(URL_1)
.execute();
Response r = f.get();
/* I want code without saving and restoring cookie */
List<Cookie> cookies = r.getCookies();
AsyncHttpClient.BoundRequestBuilder b = asyncHttpClient.prepareGet(URL_2)
for (Cookie c : cookies) {
b.addCookie(c);
}
f = b.execute();
r = f.get();
I want remove complex code, how can I do it