HttpRequest 构造函数
适用于任何类型的请求(GET、POST等)的通用构造函数。
此调用与open一起使用
var request = new HttpRequest();
request.open('GET', 'http://dartlang.org');
request.onLoad.listen((event) => print(
'Request complete ${event.target.reponseText}'));
request.send();
是(更详细的)等价于
HttpRequest.getString('http://dartlang.org').then(
(result) => print('Request complete: $result'));
实现
factory HttpRequest() {
return HttpRequest._create_1();
}