Cookies Handling in Netty

23 views
Skip to first unread message

Mani Chaitanya

unread,
Aug 17, 2016, 2:07:16 AM8/17/16
to Netty discussions
Hello,

I am little confused differences between ClientCookieEncoder and ServerCookieEncoder. Could someone please explain the difference with some usecases?

Norman Maurer

unread,
Aug 17, 2016, 2:35:45 AM8/17/16
to ne...@googlegroups.com
One is for server side and one for client side… What are you confused about ?

On 17 Aug 2016, at 08:07, Mani Chaitanya <chait...@gmail.com> wrote:

Hello,

I am little confused differences between ClientCookieEncoder and ServerCookieEncoder. Could someone please explain the difference with some usecases?


--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netty/2df975d5-8524-43f6-9dbb-feb902039b60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mani Chaitanya

unread,
Aug 17, 2016, 2:47:51 AM8/17/16
to Netty discussions
My confusion is for the below piece of code where I have set of cookies and I need to set the cookies on the request headers. For converting the set of cookies to a single string shall I have to use ClientCookieEncoder or ServerCookieEncoder?

Set<Cookie> outputs = ....
String cookieStr = ClientCookieEncoder.LAX.encode(outputs);
request.headers().set(COOKIE, cookieStr);
Reply all
Reply to author
Forward
0 new messages