node_http library

HTTP client using Node I/O system for Dart.

See NodeClient for details.

Classes

BaseClient
The abstract base class for an HTTP client. [...]
BaseRequest
The base class for HTTP requests. [...]
BaseResponse
The base class for HTTP responses. [...]
ByteStream
A stream of chunks of bytes representing a single piece of data.
HttpAgentOptions
HttpsAgentOptions
NodeClient
HTTP client which uses Node.js I/O system. [...]
Request
An HTTP request where the entire request body is known in advance.
Response
An HTTP response where the entire response body is known in advance.
StreamedRequest
An HTTP request where the request body is sent asynchronously after the connection has been established and the headers have been sent. [...]
StreamedResponse
An HTTP response where the response body is received asynchronously after the headers have been received.

Functions

delete(dynamic url, {Map<String, String> headers}) Future<Response>
Sends an HTTP DELETE request with the given headers to the given URL, which can be a Uri or a String. [...]
get(dynamic url, {Map<String, String> headers}) Future<Response>
Sends an HTTP GET request with the given headers to the given URL, which can be a Uri or a String. [...]
Sends an HTTP HEAD request with the given headers to the given URL, which can be a Uri or a String. [...]
patch(dynamic url, {Map<String, String> headers, dynamic body, Encoding encoding}) Future<Response>
Sends an HTTP PATCH request with the given headers and body to the given URL, which can be a Uri or a String. [...]
post(dynamic url, {Map<String, String> headers, dynamic body, Encoding encoding}) Future<Response>
Sends an HTTP POST request with the given headers and body to the given URL, which can be a Uri or a String. [...]
put(dynamic url, {Map<String, String> headers, dynamic body, Encoding encoding}) Future<Response>
Sends an HTTP PUT request with the given headers and body to the given URL, which can be a Uri or a String. [...]
read(dynamic url, {Map<String, String> headers}) Future<String>
Sends an HTTP GET request with the given headers to the given URL, which can be a Uri or a String, and returns a Future that completes to the body of the response as a String. [...]

Exceptions / Errors

ClientException
An exception caused by an error in a pkg/http client.