dioPut method
Implementation
Future<Response> dioPut({Uri? uri, InputServiceInterface? input}) async {
Response response;
try {
if (uri != null) {
response = await dio.putUri(uri,
data: input?.formData ?? input?.queryParameters,
onReceiveProgress: input?.onReceiveProgress,
onSendProgress: input?.onSendProgress);
} else {
response = await dio.put(input!.path,
data: input.formData ?? input.queryParameters,
onReceiveProgress: input.onReceiveProgress,
onSendProgress: input.onSendProgress);
}
return Future.value(response);
} on DioException catch (e) {
return Future.error(AppError(
requestOptions: e.requestOptions,
response: e.response,
error: e.error,
type: e.type));
}
}