-api-id | -api-type |
---|---|
M:Windows.Web.Http.HttpCookieManager.SetCookie(Windows.Web.Http.HttpCookie,System.Boolean) |
winrt method |
Add or change an HttpCookie in the cookies associated with an app.
The HttpCookie to change or add.
A value that indicates whether the HttpCookie is a third party HTTP cookie.
true if the HttpCookie replaced an existing cookie; otherwise false.
If the HttpCookie already exists, then the values and parameters associated the HttpCookie are updated.
If the HttpCookie does not exist, then the HttpCookie is added based on policy. For example, the policy might be to reject third-party cookies.
The added or changed HttpCookie will be sent on subsequent HTTP requests.
Setting an HttpCookie doesn't update the HttpCookieCollection previously returned by the GetCookies method.