feat: api token login

This commit is contained in:
Dr-Blank 2024-09-06 15:10:00 -04:00
parent 880960c745
commit 682631fb8e
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
17 changed files with 993 additions and 254 deletions

View file

@ -0,0 +1,21 @@
import 'package:http/http.dart' as http;
import 'package:logging/logging.dart';
final _logger = Logger('ErrorResponse');
class ErrorResponse {
String? name;
http.Response _response;
ErrorResponse({
this.name,
http.Response? response,
}) : _response = response ?? http.Response('', 418);
void storeError(http.Response response, [Object? error]) {
_logger.warning('for $name got response: $response');
_response = response;
}
http.Response get response => _response;
}