Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.38 KB

httpcookiemanager_setcookie_1318494933.md

File metadata and controls

37 lines (25 loc) · 1.38 KB
-api-id -api-type
M:Windows.Web.Http.HttpCookieManager.SetCookie(Windows.Web.Http.HttpCookie,System.Boolean)
winrt method

Windows.Web.Http.HttpCookieManager.SetCookie

-description

Add or change an HttpCookie in the cookies associated with an app.

-parameters

-param cookie

The HttpCookie to change or add.

-param thirdParty

A value that indicates whether the HttpCookie is a third party HTTP cookie.

-returns

true if the HttpCookie replaced an existing cookie; otherwise false.

-remarks

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.

-examples

-see-also

SetCookie(HttpCookie)