//connection will not close but needed
// headers.set("Connection","keep-alive");
headers.set(
HttpHeaderNames.COOKIE, ClientCookieEncoder.encode(
new DefaultCookie("my-cookie", "foo"),
new DefaultCookie("another-cookie", "bar"))
);
// send request
List<Entry<String, String>> entries = headers.entriesConverted();
channel.writeAndFlush(request);