c# - Mapping Header cookie string to CookieCollection and vice versa -
consider web response header:
set-cookie: sample=testcookie; domain=.sample.com; expires=tue, 25-jan-2012 00:49:29 gmt; path=/
this header mapped cookiecollection
in .net
. , when deal cookiecollection
converted such header string
.
i'm looking way purely conversions in 2 way. surely .net
has in it's internal library. believe class constructs object model text , vice versa should support 2 methods (here cookiecollection
):
// creating cookie collection header text cookiecollection.tryparse(cookieheaderstring, out mycookiecollection); // , getting final header sent request string cookieheaderstring = mycookiecollection.getcookieheaderstring();
how can achieve cookiecollection
?
i think looking cookiecontainer. see setcookies method.
Comments
Post a Comment