node_http 1.0.1 copy "node_http: ^1.0.1" to clipboard
node_http: ^1.0.1 copied to clipboard

HTTP client powered by Node.js I/O system.

example/node_http.dart

import 'package:node_http/node_http.dart' as http;

void main() async {
  // For one-off requests.
  final response = await http.get('https://example.com/');
  print(response.body);
  // To re-use socket connections:
  final client = http.NodeClient();
  final response2 = await client.get('https://example.com/');
  print(response2.body);
  client.close(); // make sure to close the client when work is done.
}
2
likes
30
pub points
43%
popularity

Publisher

unverified uploader

HTTP client powered by Node.js I/O system.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

http, node_interop, node_io

More

Packages that depend on node_http