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