toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() => {
  if (status.isNotDefault) 'status': status,
  if (reason.isNotDefault) 'reason': reason,
  if (headers.isNotDefault) 'headers': [for (final i in headers) i.toJson()],
  if (body.isNotDefault) 'body': encodeBytes(body),
};