whenMethod method
Implementation
String whenMethod(
String method, {
required String Function() onStream,
required String Function() onFuture,
// required String Function() onDownload,
}) {
switch (method) {
case 'getSse':
case 'postSse':
case 'putSse':
case 'patchSse':
case 'deleteSse':
return onStream();
// case 'download':
// return onDownload();
default:
return onFuture();
}
}