Question

I have a problem with getting and sending this cookie header. To be more specific - with that MenuData cookie.

I'm sending GET request and with response i get this one particular cookie which I need to send back in next POST request. The problem is that i get it in two parts(in cookiecontainer) and i have no idea how to Encode/Decode it to send it properly.

Here's the cookie header of POST i'm trying to send. (//// - parts i need to put together)

Cookie:

//// MenuData={'Type':null;

ASP.NET_SessionId=oe5qzthlb51ri5nzxddadzzo;
.LoginISerwis=2880E262ECC48BD7D12443EDC97D9641E85401A345B629C2002AC89F22CEBD201700417EB0D499C6E8F10816AC1F457FF7CBD671C83509CEF405236C91D6CDD81543BF1EC507319EDD587E6FFDEBA80DFAD30D769DF6F70C942ABBCB383A0C0A0BF127F40FB4C04F25A6F68469EFAF51503EF10DCFF2F51A9B31040575B14962; 

CustomerLogin=ID=xxxx&Login=xxxxx&RememberLogin=True;


//// 'Id':null}=

I need an advices how I can handle this kind of cookies.

Was it helpful?

Solution

Unfortunately, CookieContainer is known to have problems with parsing cookies with commas in them. My advice is to manually read the cookie header at this particular step and pass the cookie along to your next request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top