NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1787 most downloaded on pub.dev
Transport library for sending HTTP requests and opening WebSockets. Platform-independent with builtin support for browser and Dart VM (even supports SockJS). Includes mock utilities for testing.
Last release 5 months ago
30 Apr 2026
Release timing varies
gaps range from 8 days to 8 months
Most releases are documented
notes for 46 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
69 releases · first in 2015
Bug Fix: requests created from a Client now properly inherit all of the autoRetry configuration. Previously the backOff, forTimeouts, and maxRetries s
March 2, 2016
Client now properly inherit all of the
autoRetry configuration. Previously the backOff, forTimeouts, and
maxRetries settings were missing.Nothing published for this version
Implemented retry back-off to allow fixed or exponential back-off between request retries. By default, there is no back-off.
One column per quarter.
February 11, 2016
Implemented retry back-off to allow fixed or exponential back-off between request retries. By default, there is no back-off.
// Fixed back-off: 1 second between attempts.
var request = new Request();
request.autoRetry
..enabled = true
..backOff = new RetryBackOff.fixed(new Duration(seconds: 1));
// Exponential back-off: 250ms, 500ms, 1s, 2s, etc (base*2^attempt)
var request = new Request();
request.autoRetry
..enabled = true
..backOff = new RetryBackOff.exponential(new Duration(milliseconds: 125));
Added methods to all request classes for manually retrying failures. This is mainly useful for corner cases where the request's success is dependent on something else and where automatic retrying won't help.
var request = new Request();
// send request, catch failure
var response = await request.retry(); // normal
var response = await request.streamRetry(); // streamed
Improved error messaging around failed requests. If automatic retrying is enabled, the error message for a failed request will include each individual attempt and why it failed.
Added an autoRetry.forTimeouts flag (defaults to true) to the Client class and all request classes. This flag determines whether or not requests that
February 8, 2016
Added an autoRetry.forTimeouts flag (defaults to true) to the Client
class and all request classes. This flag determines whether or not requests
that are canceled due to exceeding the timeout threshold should be retried.
// This request will retry if the timeout is exceeded.
var request = new Request()
..timeoutThreshold = new Duration(seconds: 10)
..autoRetry.enabled = true;
// This request will NOT retry if the timeout is exceeded.
var request = new Request()
..timeoutThreshold = new Duration(seconds: 10)
..autoRetry.enabled = true
..autoRetry.forTimeouts = false;
Added a Duration sockJSTimeout config option to WSocket.connect().
// browser only
var socket = await WSocket.connect(Uri.parse('...'),
useSockJS: true, sockJSTimeout: new Duration(seconds: 5));
This global configuration has been deprecated.
January 7, 2016
As of v2.0.0, this library could be configured to use SockJS under the hood when
the WSocket class was used to establish WebSocket connections. This
configuration occurred on a global basis (meaning it affected every WSocket
instance) which is undesirable for applications with a mixed usage of native
WebSockets and SockJS. This global configuration has been deprecated.
As of v2.1.0, passing useSockJS: true to the configureWTransportForBrowser()
method will cause a deprecation warning to be printed to the console.
The SockJS configuration should now occur on a per-socket basis via the
WSocket.connect() method:
Uri uri = Uri.parse('ws://echo.websocket.org');
WSocket webSocket = await WSocket.connect(uri,
useSockJS: true, sockJSProtocolsWhitelist: ['websocket', 'xhr-streaming']);
Added a baseUri field to Client that all requests from the client will
inherit.
All request classes now support a timeout threshold via the timeoutTreshold
field. This was also added to the Client class and all requests created from
a client will inherit this value.
Request and response interception is now supported. This can be done directly
on a request instance, but more usefully through a Client instance. See
"request & response interception"
and "intercepting requests & responses from a client"
in the README.
All request classes and the Client class now include an API for automatic
retrying via the autoRetry field. See "automatic request retrying"
in the README.
Added a replace method to Response and StreamedResponse to allow simple
creation of new responses based on another response, while changing only the
fields you specify. This is particularly useful during response interception.
.get(headers: {...}))
are now merged with any existing headers on the request (previously they were
being ignored).Nothing published for this version
> The 2.0.0 release is a major breaking release. While many of the patterns from
November 24, 2015
The 2.0.0 release is a major breaking release. While many of the patterns from 1.0.x were maintained, the HTTP API was broken up into several request classes and two response classes for a much more robust and useful API. As such, there is no backwards compatibility, but a migration guide is included below.
WebSockets
HTTP
Request (content-type: text/plain)JsonRequest (content-type: application/json)FormRequest (content-type: application/x-www-form-urlencoded)MultipartRequest (content-type: multipart/form-data)StreamedRequest).streamGet(), streamPost(), etc. on any
of the above request classes.Mocks
package:w_transport/w_transport_mock.dart and call
configureWTransportForTest() to configure w_transport to use mock
implementations for every class.MockTransports class to control WebSocket connections and HTTP
requests.Testing
w_transport has 99.7%
coverage!WRequestThe WRequest class attempted to cover all HTTP request use cases. Its closest
analog now is Request - the class for sending plain-text requests. All other
request classes share a similar base API with additional support for a specific
type of request data (JSON, form, multipart, or streamed).
WResponseThe WResponse class made request meta data (status, headers) available as soon
as the request had finished; however, in an attempt to unify the API between the
dart:io HTTP requests and dart:html XHR requests, the response body was only
available asynchronously (as a stream, an untyped future, or decoded to text).
This meant two asynchronous steps were required for every request - one to get
the response, and one to get the response body.
This has been greatly improved by switching to two different response classes:
Response - response meta data and body available synchronouslyStreamedResponse - response meta data available synchronously, body
available as a stream of bytesAllow request data to be set to null.
June 23, 2015
Bug Fixes:
null.WHttp
instance.Initial version of w_transport: a fluent-style, platform-agnostic library with ready to use transport classes for sending and receiving data over HTTP
May 21, 2015
Your coding agent can read these notes before it upgrades. Set up the MCP server →