Gets the HTTP cookie header that contains the HTTP cookies that represent the System.Net.Cookie instances that are associated with a specific URI.
- uri
- The URI of the System.Net.Cookie instances desired.
An HTTP cookie header, with strings representing System.Net.Cookie instances delimited by semicolons.
CookieContainer.GetCookieHeader(Uri) returns a string that holds the HTTP cookie header for the System.Net.Cookie instances specified by uri. The HTTP header is built by adding a string representation of each System.Net.Cookie associated with uri. Note that the exact format of the string depends on the RFC that the System.Net.Cookie conforms to. The strings for all the System.Net.Cookie instances that are associated with uri are combined and delimited by semicolons.
This string is not in the correct format for use as the second parameter of the CookieContainer.SetCookies(Uri, string) method.