get static method
GET 请求
Implementation
static Future<http.Response> get(
String url, {
Map<String, String>? headers,
Duration timeout = const Duration(seconds: 30),
}) async {
_logRequest('GET', url, headers: headers);
try {
final response = await http
.get(Uri.parse(url), headers: headers)
.timeout(timeout);
_logResponse('GET', url, response);
return response;
} catch (e) {
_logError('GET', url, e);
rethrow;
}
}