Closed crazecoder closed 5 years ago
@crazecoder: are you running it in a console (e.g. dart main.dart
)? In that case you should import http_client/console.dart
.
another thing, I'd suggest using the following, because it is simpler:
Future main() async {
final client = new http.ConsoleClient();
final rs = await client.send(http.Request('GET', "http://https://github.com"));
print(rs.body);
}