HttpRequest constructor

HttpRequest()

General constructor for any type of request (GET, POST, etc).

This call is used in conjunction with open:

var request = new HttpRequest();
request.open('GET', 'http://dartlang.org');
request.onLoad.listen((event) => print(
    'Request complete ${event.target.reponseText}'));
request.send();

is the (more verbose) equivalent of

HttpRequest.getString('http://dartlang.org').then(
    (result) => print('Request complete: $result'));

Implementation

factory HttpRequest