safeRequest method
Future<OxyResult<Response>>
safeRequest(
- String method,
- String path, {
- QueryMap? query,
- Object? body,
- Object? json,
- RequestOptions? options,
- ProgressCallback? onSendProgress,
- ProgressCallback? onReceiveProgress,
})
Implementation
Future<OxyResult<Response>> safeRequest(
String method,
String path, {
QueryMap? query,
HeadersInit? headers,
Object? body,
Object? json,
RequestOptions? options,
ProgressCallback? onSendProgress,
ProgressCallback? onReceiveProgress,
}) {
return _capture(
() => request(
method,
path,
query: query,
headers: headers,
body: body,
json: json,
options: options,
onSendProgress: onSendProgress,
onReceiveProgress: onReceiveProgress,
),
);
}