content property

List<int> content

Implementation

List<int> get content {
  var body = this.body;

  if (body is List<int>) {
    return body;
  }

  if (body is Map || body is List) {
    body = json.encode(body);
  }

  if (body is String) {
    return utf8.encode(body);
  }

  return <int>[];
}