NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1798 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
Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This patch release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This patch release includes the following changes:
#456 Raise the mime dependency min to 1.0.0 and max to 3.0.0
#457 RM-383407 Release w_transport 5.4.4
Notes created on Thursday, April 30 07:31 PM UTC
Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This patch release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This patch release includes the following changes:
#453 Update SDK range in example
#454 RM-382694 Release w_transport 5.4.3
Notes created on Tuesday, February 24 07:38 PM UTC
One column per quarter.
Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This patch release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This patch release includes the following changes:
#451 2_raise_build_deps_max_for_analyzer_10
#452 RM-351805 Release w_transport 5.4.2
Notes created on Sunday, February 22 07:54 PM UTC
Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This patch release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This patch release includes the following changes:
Notes created on Tuesday, August 26 08:02 PM UTC
Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This minor release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This minor release includes the following changes:
#445 Rollout React 18 to tests and example apps
#446 FEA-8447: Add BinaryRequest for sending requests and reading responses as ArrayBuffers in the browser
BinaryRequest for sending requests and reading responses as ArrayBuffers in the browser#447 FEDX-3766: no_entrypoint_imports
#448 RM-343161 Release w_transport 5.4.0
Notes created on Monday, August 18 05:29 PM UTC
BinaryRequest for sending raw bytes with proper browser support using
the responseType field on the XHR instance.Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This minor release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This minor release includes the following changes:
#437 Prep for auto-publish
#438 Raise the uuid dependency max to v5.0.0
#439 Raise the uuid dependency min to v4.0.0
#443 FEA-8162: Support setting Websocket.binaryType
Websocket.binaryType#444 RM-304477 Release w_transport 5.3.0
Notes created on Wednesday, July 16 09:42 PM UTC
WebSocket.binaryType field to allow configuring the binary type
for WebSocket connections in the browser. Has no impact on the VM or when using SockJS.Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This patch release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This patch release includes the following changes:
Notes created on Tuesday, December 17 08:32 PM UTC
Build: (waiting for build to complete) Skynet Results: (waiting for Skynet results) Pipeline: (waiting for pipeline to start) This patch release inclu
Build: (waiting for build to complete)
Skynet Results: (waiting for Skynet results)
Pipeline: (waiting for pipeline to start)
This patch release includes the following changes:
#425 DSC-10121 - Complete transition to GHA
#427 Replace mockito with mocktail
#428 Workiva Analysis Options v2
#429 Raise the build_web_compilers dependency max to v5.0.0
#430 Raise the meta dependency min to v1.16.0
#432 raise_min_dart_sdk_2_19
#433 RM-251053 Release w_transport 5.2.2
Notes created on Saturday, December 07 12:24 AM UTC
Build: https://ci.webfilings.com/build/5728165 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/5728165/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/5728165
Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/5728165/latest
Pipeline: No Pipeline
This patch release includes the following changes:
#421 FEA-3269: Fixed CI and addressed NNBD errors
#422 Allow consumption of null-safe over_react and over_react_test versions
#423 Consume null-safe over_react v5 and over_react_test v3
#424 RM-222341 Release w_transport 5.2.1
Notes created on Friday, March 29 11:13 PM UTC
Build: https://ci.webfilings.com/build/5155449 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/5155449/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/5155449
Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/5155449/latest
Pipeline: No Pipeline
This minor release includes the following changes:
Notes created on Friday, November 03 08:51 PM UTC
debugUrl to WebSocketConnectEvent which is emitted via the
GlobalWebSocketMonitor. When using SockJS, this will be populated with the
full URL that the underlying transport is using, which can be useful information
for debugging.Added defaultTimeoutThreshold top level field to add a timeout for all requests by default.
defaultTimeoutThreshold top level field to add a timeout for all requests by default.Made RequestException.request nullable and re-add the null check, as we found unsound consumer usages where this could be null.
RequestException.request nullable and re-add the null check, as we
found unsound consumer usages where this could be null.collection dependency to a non-pre-release version.Made as much of the public API non-nullable as safely possible.
.get() and .post()) return non-nullable: if any
response interceptor takes a non-null response but returns a null response,
the original non-null response will be used instead. In practice, we don't
think this is common, and being able to make request methods return
non-nullable was worth it.Bug Fix: When using MockTransports.install(fallThrough: true), the optional body param on the send() method will now properly be applied when the requ
MockTransports.install(fallThrough: true), the
optional body param on the send() method will now properly be applied when
the request "falls through" the mock config to a real request..streamGet() over .get() for binary responses that
will be read as bytes (via body.asBytes()).Nothing published for this version
Widen ranges on fluri and http_parser
fluri and http_parserImprovement JSON content will always decode as utf-8. Previously it would fall back to the encoding specified for the body, or to ISO-8859-1, which wa
Improvement: AutoRetryConfig gained the increaseTimeoutOnRetry flag. This allows timeouts to increase as retry attempts increase.
AutoRetryConfig gained the increaseTimeoutOnRetry flag.
This allows timeouts to increase as retry attempts increase.Nothing published for this version
- Update the changelog
Bug Fix: The body parameter given to Request.send() was being ignored. It should now be used as expected.
body parameter given to Request.send() was being ignored.
It should now be used as expected.Improvement: Implement equality for RegExp to ensure 2 mock request handlers with the same pattern and regex settings are stored in a common map.
RegExp to ensure 2 mock request
handlers with the same pattern and regex settings are stored in a common map.This is a major release with breaking changes.
This is a major release with breaking changes.
Previously, this project included a sockjs_client dependency via a git
reference, but in July of 2019 pub.dev began disallowing the publishing
of packages with git dependencies. Additionally, this package included public
APIs that depended on this git dependency. We are unable to get this dependency
moved to pub.dev, so our only option is to release a major version and
remove our usage of this dependency and any relevant APIs.
We also had some pre-existing deprecations that we are removing in this major release.
With only a couple of exceptions, this 4.0.0 version should be backwards- compatible with 3.x.x as long as uses of deprecated APIs have been resolved.
WebSocket must
now include sockjs.js on the page:
WSocket class. Use WebSocket instead.WSocketCloseEventWSocketExceptionuseSockJS or
sockJSProtocolsWhitelist) for:
configureWTransportForBrowser()WebSocket.connect()closeCode and closeReason getters to
MockWebSocketServer.HttpRequest and
HttpClientResponsedart_dev v3workiva_analysis_options to simplify linter/analysis
configuration.Tech-debt: upgrade to dart_dev v2
dart_dev v2Improvement: Dart 2 compatible!
October 10th, 2018
Bug Fix: When using MockTransports with fallThrough: true, requests that fall through now properly copy over contentLength and contentType if applicab
July 19th, 2018
Bug Fix: When using MockTransports with fallThrough: true, requests that
fall through now properly copy over contentLength and contentType if
applicable.
Dependency: Upgraded minimum sockjs_client_wrapper version to 1.0.4 in
order to pull in SockJS v1.1.5.
Bug Fix: The previous version introduced a new transformer for the w_transport examples, but did not properly scope it to the examples/ directory. Thi
May 17th, 2018
Bug Fix: The previous version introduced a new transformer for the
w_transport examples, but did not properly scope it to the examples/
directory. This led to the following error during a pub get for
some consumers:
Precompiling dependencies...
Loading source assets...
Error on line 1, column 1 of https://pub.dartlang.org/api/packages/w_transport: Error loading transformer "over_react": package "over_react" is not a dependency.
This has been fixed. If you're still seeing this error, run
pub upgrade w_transport to make sure you have the latest.
Bug Fix: The browser implementation of MultipartRequest was previously adding every field to the FormData twice - this has been fixed.
May 16th, 2018
MultipartRequest was previously
adding every field to the FormData twice - this has been fixed.Improvement: Now compatible with Dart 2 and the Dart Dev Compiler.
April 25th, 2018
Documentation: Fixed some broken links.
April 20th, 2018
Bug Fix: The sockjs.js detection now uses context.hasProperty() instead of actually trying to access the SockJS object on the window. This fixes an ex
January 29th, 2018
sockjs.js detection now uses context.hasProperty()
instead of actually trying to access the SockJS object on the window. This
fixes an exception that was being thrown silently in certain situations.The SockJS wrapper requires that the JS library be included in the HTML page. To avoid a breaking change, it will only be used if the JS library is de…
January 4th, 2018
Improvement: Added support for the sockjs_client_wrapper package. This will eventually replace our usage of the sockjs_client Dart port
because the wrapper uses the actual JS library which is fully-featured and community supported.
The SockJS wrapper requires that the JS library be included in the HTML page. To avoid a breaking change, it will only be used if the JS library is detected on the window.
If you are using the SockJS configuration for WebSocket and wish to leverage
this more fully-featured SockJS (which provides all of the SockJS protocols
e.g. xhr-polling), all you need to do is add the JS script to your
application page:
https://github.com/workiva/sockjs_client_wrapper#usage
If you don't change anything, the SockJS configuration for WebSocket will
still behave exactly the same and you should see no difference.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Bug Fix: When a request is canceled, it will now always result in the done Future resolving. Previously it was possible for the done Future to never r
March 15th, 2017
done Future resolving. Previously it was possible for the done Future to
never resolve if the request was canceled at a certain point during the
request lifecycle.Bug Fix: When MockTransports is installed with "fall-through" enabled, the optional SockJS params that are available on the new transport.WebSocket()
February 3rd, 2017
MockTransports is installed with "fall-through" enabled,
the optional SockJS params that are available on the
new transport.WebSocket() constructor are now properly passed through.
Previously, a standard WebSocket implementation would have been constructed
erroneously if useSockJS: true was set, but it now correctly constructs the
SockJS implementation.Bug Fix: If a request's autoRetry.test function is supplied and returns true when the response is null, a request that was canceled would erroneously
January 18th, 2017
autoRetry.test function is supplied and returns
true when the response is null, a request that was canceled would
erroneously be retried. Canceling a request now properly makes it ineligible
for retry regardless of other factors.This major release includes deprecations and an increased minimum Dart SDK version. This release should be backwards compatible with version 2.x.
October 25th, 2016
This major release includes deprecations and an increased minimum Dart SDK version. This release should be backwards compatible with version 2.x.
To upgrade, check out the v3.0.0 upgrade guide.
There is a new pattern for configuring w_transport for a particular
platform. Check out the Transport Platform Configuration guide.
There is a new way to install the transport mocks (instead of
configureWTransportForTest()). Check out the
Mock Transports Installation guide.
Renamed entry points:
w_transport_browser.dart --> browser.dartw_transport_mock.dart --> mock.dartw_transport_vm.dart --> vm.dartOther renames:
Client --> HttpClientWSocket --> WebSocketWSocketException --> WebSocketExceptionRetryBackOff.duration --> RetryBackOff.intervalOther deprecations:
WSocketCloseEventMockBaseRequestMockClientMockFormRequestMockJsonRequestMockPlainTextRequestMockResponseMockStreamedRequestMockStreamedResponseMockWSocketw_transport documentation has been revamped with an emphasis on examples
and guides. Check them out now!Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Bug Fix: The Future returned from WSocket.cancel() no longer waits for the WebSocket to be closed.
October 14, 2016
Future returned from WSocket.cancel() no longer waits for
the WebSocket to be closed.Bug Fix: if a request is canceled right before it would also have exceeded the timeout threshold, a StateError may be thrown due to a Completer being
September 8, 2016
StateError may be thrown due to a Completer being
completed more than once. This is fixed now.Widen the version range for the http_parser dependency to speed up and/or fix downstream consumers experiencing version conflicts.
August 11, 2016
http_parser dependency to speed up and/or
fix downstream consumers experiencing version conflicts.Bug Fix: previously, listening to a WSocket instance and then canceling the subscription before closing the socket would result in the "done" state ne
August 2, 2016
WSocket instance and then canceling
the subscription before closing the socket would result in the "done" state
never being reached. This is fixed now and the Future returned from
WSocket.done and WSocket.close() will always resolve once the connection
is closed.Improvement: All request classes now have a bool isDone getter that can be read to determine whether or not a request is complete (i.e. succeeded, fai
July 26, 2016
Improvement: All request classes now have a bool isDone getter that can
be read to determine whether or not a request is complete (i.e. succeeded,
failed, or canceled).
Bug Fix: Calling request.abort() more than once will no longer throw a
StateError.
Improvement: Mock transport handlers can now be canceled. This will allow consumers to remove HTTP or WebSocket mock handlers without having to call M
July 21, 2016
Improvement: Mock transport handlers can now be canceled. This will allow
consumers to remove HTTP or WebSocket mock handlers without having to call
MockTransports.reset() or MockTransports.uninstall.
var uri = Uri.parse('/example');
var myHttpHandler = MockTransports.http.when(uri, (request) { ... });
myHttpHandler.cancel();
var myWebSocketHandler = MockTransports.webSocket.when(uri,
handler: (protocols, headers) { ... });
myWebSocketHandler.cancel();
/// The same works for the `whenPattern()` methods, as well.
Bug Fix: previously, you could not retry a request that failed with a null response. This is now allowed, but still has the same default behavior. To
July 20, 2016
Bug Fix: previously, you could not retry a request that failed with a
null response. This is now allowed, but still has the same default behavior.
To retry a request with a null response, use the autoRetry.test method
accordingly:
var request = new Request();
request.autoRetry
..enabled = true
..test = (request, response, willRetry) {
if (response == null) return true;
return willRetry;
};
Deprecation: autoRetry.backOff.duration has been deprecated in favor of the more aptly named autoRetry.backOff.interval.
June 23, 2016
Deprecation: autoRetry.backOff.duration has been deprecated in
favor of the more aptly named autoRetry.backOff.interval.
Improvement: Automatic request retrying will now add
jitter to the
backoff intervals by default. To disable jitter, set
autoRetry.backOff.withJitter = false;.
Improvement: You can now put a cap on the backoff interval used during automatic request retrying.
request.autoRetry.backOff.maxInterval = new Duration(minutes: 2);
Bug Fix: A request's encoding property can no longer be set to null.
This would have most likely caused an RTE when the request was sent, so now an
ArgumentError will be thrown immediately.
Bug Fix: As of 2.6.0, if you were to set a request's content-type manually
without a charset or with an unknown charset, it was possible to hit an RTE
due to a null encoding. The HttpBody class has been updated to be more
resilient to a missing encoding or charset. Additionally, all request classes
will now pass in the value of its encoding property, which should now always
be non-null.
Improvement: The MockTransport utilities now support expecting and registering handlers for HTTP requests and WS connections that match a Pattern inst
June 20, 2016
Improvement: The MockTransport utilities now support expecting
and registering handlers for HTTP requests and WS connections that
match a Pattern instead of exactly matching a URI. Handlers will
also receive the Match instance.
var response = new MockResponse.ok();
var webSocket = new MockWSocket();
var uriPattern = new RegExp('(http|ws)s:\/\/example.com\/(.*)');
// Capture any GET request to example.com/
MockTransports.http.expectPattern('GET', uriPattern, respondWith: response);
// Register a handler for any GET request to https://example.com/
// The `Match` instance will be given to the handler, where it can be used
// to read any of the captured groups.
MockTransports.http.whenPattern(uriPattern, (request, match) async {
print('path: ${match.group(2)}');
return response;
}, method: 'GET');
// Capture any WS connection attempt to example.com/
MockTransports.webSocket.expectPattern(uriPattern, connectTo: webSocket);
// Register a handler for an WS connection attempt to example.com/
// The `Match` instance will be given to the handler, where it can be used
// to read any of the captured groups.
MockTransports.webSocket.whenPattern(uriPattern, handler:
(uri, {protocols, headers, match}) async {
print('path: ${match.group(2)}');
return webSocket;
});
Improvement: the content-type for HTTP requests can now be set manually.
var request = new Request()
..uri = Uri.parse('/example')
..contentType =
new MediaType('application', 'x-custom', {'charset': UTF8.name});
The content-type still has a default value based on the type of request
(Request - text/plain, JsonRequest - application/json, etc.).
The content-type's charset parameter will still be updated automatically
when you set the encoding, but once you manually set contentType, this
behavior will stop. In other words, we are assuming that if you set
contentType manually, you are intentionally overriding the defaults and
are taking responsibility of setting the charset parameter appropriately.
Bug Fix: the StreamedRequest now properly verifies that the request has
not been sent when setting contentType. It will now throw a StateError
like the rest of the request types.
Error Messaging: When a response body cannot be properly decoded/encoded using the Encoding dictated by the content-type header, a ResponseFormatExcep
June 16, 2016
Encoding dictated by the content-type header, a
ResponseFormatException will now be thrown with a much more descriptive
message. The content-type, encoding, and body will be included.> The WSocketCloseEvent class has been deprecated. This class was only used
June 15, 2016
Bug Fix: WSocket extends Stream and StreamSink, but was not
fulfilling those contracts in all scenarios. In particular:
After obtaining a StreamSubscription instance from a call to
WSocket.listen(), reassigning the onData(), onError(), and onDone()
handlers had no effect.
var webSocket = await WSocket.connect(...);
var subscription = webSocket.listen((data) { ... });
// This does nothing:
subscription.onData((data) { ... });
// Same goes for onError() and onDone()
A subscription to a WSocket instance did not properly respect pause and
resume signals. This could produce a memory leak by buffering WebSocket
events indefinitely.
A WSocket instance was immediately listening to the underlying WebSocket
and buffering events from the underlying WebSocket until a listener was
registered. This is not how a standard Dart Stream works.
The SockJS configuration was not properly handling the fact that the SockJS
Client produces WebSocket events with a broadcast stream.
All of these issues have been addressed, and every WSocket instance
should now behave exactly as a standard Stream and StreamSink would,
regardless of the platform (VM, browser, SockJS, or mock).
The
WSocketCloseEventclass has been deprecated. This class was only used internally and should not have been exported as a part of the public API.
The WSocket implementations are no longer registering an
onErrorhandler for the underlying WebSocket stream. If an error occurs on the server, it will not add the error to the stream, it will just close the connection. As a result, theMockWSocket.triggerServerError()method has been deprecated - useMockWSocket.triggerServerClose()instead.
Improvement: FormRequest now supports fields with multiple values.
May 4, 2016
Improvement: FormRequest now supports fields with multiple values.
var request = new FormRequest()
..fields['multi'] = ['one', 'two'];
SDK Compatibility: Dart 1.16 exposed a new Client class from the
dart:html library that conflicted with the Client class in this library.
This has been fixed by adjusting our imports internally, but it may still
affect consumers of this library.
Documentation: fixed inaccurate documentation around mocking & testing with WebSockets.
Your coding agent can read these notes before it upgrades. Set up the MCP server →