sendString method

Future sendString(
  1. dynamic message
)

Implementation

Future sendString(message) async {
  if(message != ''){
    res?.statusCode = HttpStatus.ok;
    res?.headers.contentType = ContentType.text;
    res!.write(message);
    await res!.close();
  }else{
    throw CustomException('[ Error ] Empty string supplied!').showError();
  }
}