node_http 1.0.0-dev.1.0

  • Example
  • Installing
  • Versions
  • new50


HTTP client using Node I/O system for Dart.


A simple usage example:

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

main() async {
  // For one-off requests.
  final response1 = await http.get(''); 
  // To re-use socket connections:
  final client = new http.NodeClient();
  final response2 = await client.get('');

Configuration and build

Add build_node_compilers and build_runner to dev_dependencies section in pubspec.yaml of your project:

  build_runner: # needed to run the build

Add build.yaml file to the root of your project:

      - "node/**"
      - "test/**" # Include this if you want to compile tests.
      - "example/**" # Include this if you want to compile examples.

By convention all Dart files which declare main function go in node/ folder.

To build your project run following:

pub run build_runner build --output=build/

Features and bugs

Please file feature requests and bugs at the issue tracker.


  • Split from package:node_interop/http.dart.


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

main() async {
  // For one-off requests.
  await http.get('');
  // To re-use socket connections:
  final client = new http.NodeClient();
  await client.get('');
  client.close(); // make sure to close the client when work is done.

1. Depend on it

Add this to your package's pubspec.yaml file:

  node_http: "^1.0.0-dev.1.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:node_http/node_http.dart';
Version Uploaded Documentation Archive
1.0.0-dev.1.0 Feb 13, 2018 Go to the documentation of node_http 1.0.0-dev.1.0 Download node_http 1.0.0-dev.1.0 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 13, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
98 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: web, other

Primary library: package:node_http/node_http.dart with components: js.


  • Package is pre-release.

    Pre-release versions should be used with caution, their API may change in breaking ways.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <2.0.0
http ^0.11.3 0.11.3+16
node_io ^1.0.0-dev 1.0.0-dev.1.0
Transitive dependencies
async 2.0.3 2.0.4
charcode 1.1.1
collection 1.14.5
http_parser 3.1.1
js 0.6.1
node_interop 1.0.0-dev.1.0+1
path 1.5.1
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
build_node_compilers ^0.1.0
build_runner ^0.7.9
test ^0.12.0