expires property

DateTime? expires
override

The date and time specified by the expiresHeader header, if any.

Implementation

DateTime? get expires {
  final string = value('expires');
  if (string == null) return null;

  try {
    return DateTime.parse(string);
  } on FormatException {
    return null;
  }
}
void expires=(DateTime? value)
override

The date and time specified by the expiresHeader header, if any.

Implementation

set expires(DateTime? value) {
  if (value != null) {
    set('expires', value.toUtc().toIso8601String());
  } else {
    _headers.remove('expires');
  }
}