bodyAsList property
List?
bodyAsList
Implementation
List? get bodyAsList {
if (!hasParsedBody) {
throw StateError('The request body has not been parsed yet.');
// TODO: Relook at this
//} else if (_bodyList == null) {
} else if (_bodyList.isEmpty) {
throw StateError('The request body, $_bodyObject, is not a List.');
}
return _bodyList;
}
This setter allows you to explicitly set the request body exactly once.
Use this if the format of the body is not natively parsed by Angel.
Implementation
set bodyAsList(List? value) => bodyAsObject = value;