如何从 http.Response 获取状态文本?
import 'package:http/http.dart' as http;
void main() {
final req = http.Request(method, Uri.parse('http://example.com'));
final res = await http.Response.fromStream(await req.send());
// HOW TO GET statusText???
}
如何从 http.Response 获取状态文本?
import 'package:http/http.dart' as http;
void main() {
final req = http.Request(method, Uri.parse('http://example.com'));
final res = await http.Response.fromStream(await req.send());
// HOW TO GET statusText???
}