PART II
C h a p t e r 2 5 :
N e t w o r k i n g T h r o u g h t h e I n t e r n e t U s i n g S y s t e m . N e t
837
The name of the cookie is contained in
Name
, and its value is found in
Value
.
To obtain a list of the cookies associated with a response, you must supply a cookie
container with the request. For this purpose,
HttpWebRequest
defines the property
CookieContainer
, shown here:
public CookieContainer CookieContainer { get; set; }
CookieContainer
provides various fields, properties, and methods that let you store cookies.
By default, this property is null. To use cookies, you must set it equal to an instance of
the
CookieContainer
class. For many applications, you won’t need to work with the
CookieContainer
property directly. Instead, you will use the
Do'stlaringiz bilan baham: |