AF extension

on

Methods

upload(String path, String filePath, {String? filename, ProgressCallback? onSendProgress, Options? options, CancelToken? cancelToken}) Future<Response>

Static Methods

delete(String path, {bool showLoading = false, DioMethod method = DioMethod.delete, Map<String, dynamic>? params, dynamic data, CancelToken? cancelToken, Options? options}) Future<Response>
download(String urlPath, dynamic savePath, {ProgressCallback? onReceiveProgress, Map<String, dynamic>? queryParameters, CancelToken? cancelToken, bool deleteOnError = true, String lengthHeader = Headers.contentLengthHeader, dynamic data, Options? options}) Future<Response>
get(String path, {bool showLoading = false, DioMethod method = DioMethod.get, Map<String, dynamic>? params, CancelToken? cancelToken, Options? options}) Future<Response>
http GET request return Future
getCallback<T>(String path, {bool showLoading = false, DioMethod method = DioMethod.get, Map<String, dynamic>? params, CancelToken? cancelToken, Options? options, required void success(Response)?, void error(DioException)?, Function? complete}) → dynamic
http GET request return Void params required callback function
post(String path, {bool showLoading = false, DioMethod method = DioMethod.post, Map<String, dynamic>? params, CancelToken? cancelToken, Options? options}) Future<Response>
http POST request return Future
postCallback<T>(String path, {bool showLoading = false, DioMethod method = DioMethod.post, Map<String, dynamic>? params, CancelToken? cancelToken, Options? options, required void success(Response)?, void error(DioException)?, Function? complete}) → dynamic
http POST request return Void params required callback function
put(String path, {bool showLoading = false, DioMethod method = DioMethod.put, Map<String, dynamic>? params, dynamic data, CancelToken? cancelToken, Options? options}) Future<Response>