IResponseCookies Interface

A wrapper for the response Set-Cookie header.

Namespace
Microsoft.AspNetCore.Http
Assemblies
  • Microsoft.AspNetCore.Http.Features

Syntax

public interface IResponseCookies
interface Microsoft.AspNetCore.Http.IResponseCookies

Methods

Append(System.String, System.String)

Add a new cookie and value.

Arguments:
  • key (System.String) – Name of the new cookie.
  • value (System.String) – Value of the new cookie.
void Append(string key, string value)
Append(System.String, System.String, Microsoft.AspNetCore.Http.CookieOptions)

Add a new cookie.

Arguments:
void Append(string key, string value, CookieOptions options)
Delete(System.String)

Sets an expired cookie.

Arguments:key (System.String) – Name of the cookie to expire.
void Delete(string key)
Delete(System.String, Microsoft.AspNetCore.Http.CookieOptions)

Sets an expired cookie.

Arguments:
void Delete(string key, CookieOptions options)