cookie function

FutureOr<Response> Function(Event) cookie({
  1. String? secret,
  2. Hash algorithm = sha256,
  3. bool autoSecureSet = true,
  4. DateTime? expires,
  5. int? maxAge,
  6. String? domain,
  7. String? path,
  8. bool? secure,
  9. bool? httpOnly,
  10. SameSite? sameSite,
  11. bool? partitioned,
})

Creates a cookie support handler closure.

Implementation

FutureOr<Response> Function(Event) cookie({
  String? secret,
  Hash algorithm = sha256,
  bool autoSecureSet = true,
  DateTime? expires,
  int? maxAge,
  String? domain,
  String? path,
  bool? secure,
  bool? httpOnly,
  SameSite? sameSite,
  bool? partitioned,
}) {
  return cookieWith(
    next,
    secret: secret,
    algorithm: algorithm,
    autoSecureSet: autoSecureSet,
    expires: expires,
    maxAge: maxAge,
    domain: domain,
    path: path,
    secure: secure,
    httpOnly: httpOnly,
    sameSite: sameSite,
    partitioned: partitioned,
  );
}