write method

void write(
  1. Context ctx
)
override

Writes session data (session) to the Response (resp) and returns new response

Implementation

void write(Context ctx) {
  final Session session = ctx.parsedSession!;
  final Map<String, String> values = session.asMap;
  values['sid'] = session.id;
  values['sct'] = session.createdTime.millisecondsSinceEpoch.toString();
  io.write(ctx, coder.encode(values));
}