Is it possible to pass cookies to HttpWebRequest
without using property HttpWebRequest.CookieContainer
?
For some reasons, I don't have access to some object properties including HttpWebRequest.CookieContainer
. I do have access to HttpWebRequest
class and CookieContainer
class.
I'm not sure why you would want to ignore the existence of an existing mechanism and reinvent the wheel, possibly including bugs solved by the existing implementation.
Setting cookies is trivial though:
Just as reading them from the response: