toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() {
  return {
    if (status.isNotDefault) 'status': status,
    if (reason.isNotDefault) 'reason': reason,
    if (headers.isNotDefault) 'headers': encodeList(headers),
    if (body != null) 'body': encodeBytes(body),
  };
}