WebApi 获取Cookie

需要引用using System.Net.Http;

var cookies = actionContext.Request.Headers.GetCookies();

// API 推荐
HttpCookieCollection collection = HttpContext.Current.Request.Cookies;

  

posted @ 2021-11-02 14:55  zq爱生活爱代码  阅读(182)  评论(0编辑  收藏  举报