validateStatus property Null safety
late, final
Using the validateStatus config option, you can define HTTP code(s) that should throw an error.
axios.get('/user/12345', {
validateStatus: (status) {
return status < 500; // Resolve only if the status code is less than 500
}
});
Implementation
late final ValidateCallback validateStatus;