Request constructor Null safety
Implementation
Request({
required this.uri,
required this.method,
required this.headers,
ValidateCallback? validateStatus,
this.bodyBytes = const [],
required this.timeout,
this.responseType = ResponseType.json,
this.onDownloadProgress,
}) {
this.validateStatus =
validateStatus ?? (status) => status >= 200 && status < 300;
}