post<T> method
Implementation
Future<Response<T>> post<T>(
String action, {
dynamic body,
bool protected = false,
void Function(int, int)? onSendProgress,
void Function(int, int)? onReceiveProgress,
bool verbose = false,
}) async {
try {
final Response response = await client.post<T>(
action,
data: body,
options: getOptions(protected: protected),
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
);
_verboseResponse(response, verbose);
return response as Response<T>;
} on DioException catch (error) {
_verboseResponse(error.response, verbose);
rethrow;
} catch (_) {
rethrow;
}
}