Info
Version: | 1.0.0 |
Author(s): | Tomasz Margacz |
Last Update: | Tuesday, July 11, 2017 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/DotNet.Cookies |
Install
Install-Package DotNet.Cookies
dotnet add package DotNet.Cookies
paket add DotNet.Cookies
DotNet.Cookies Download (Unzip the "nupkg" after downloading)
Dependencies
Tags
Easy to use:
CookiesHelper.SetCookie("keyValue", "exampleValue", DateTime.Now.AddDays(30));
var value = CookiesHelper.GetCookieValue("keyValue");
Available basic methods:
public static string GetCookieValue(string key)
public static void SetCookie(string key, string value, DateTime expires)
Available methods:
public static string GetCookieValue(string key)
public static Dictionary<string, string> GetAllCookiesKeyAndValue()
public static HttpCookie GetCookie(string key)
public static Dictionary<string, HttpCookie> GetAllCookiesDictionary()
public static List<HttpCookie> GetAllCookies()
public static void SetCookie(string key, string value, DateTime expires)
public static void RemoveCookie(string key)
public static void RemoveAllCookies().