NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev, #2051 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.
Latest stable
5.4.4
Last release 6 months ago
30 Apr 2026
Release timing varies
gaps range from 8 days to 8 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
69 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
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:
[x] #456 Raise the mime dependency min to 1.0.0 and max to 3.0.0
[x] #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:
[x] #453 Update SDK range in example
[x] #454 RM-382694 Release w_transport 5.4.3
Notes created on Tuesday, February 24 07:38 PM UTC
Your coding agent can read these notes before it upgrades. Set up the MCP server →
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:
[x] #451 2_raise_build_deps_max_for_analyzer_10
[x] #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:
[x] #445 Rollout React 18 to tests and example apps
[x] #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[x] #447 FEDX-3766: no_entrypoint_imports
[x] #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:
[x] #437 Prep for auto-publish
[x] #438 Raise the uuid dependency max to v5.0.0
[x] #439 Raise the uuid dependency min to v4.0.0
[x] #443 FEA-8162: Support setting Websocket.binaryType
Websocket.binaryType[x] #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:
[x] #425 DSC-10121 - Complete transition to GHA
[x] #427 Replace mockito with mocktail
[x] #428 Workiva Analysis Options v2
[x] #429 Raise the build_web_compilers dependency max to v5.0.0
[x] #430 Raise the meta dependency min to v1.16.0
[x] #432 raise_min_dart_sdk_2_19
[x] #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:
[x] #421 FEA-3269: Fixed CI and addressed NNBD errors
[x] #422 Allow consumption of null-safe over_react and over_react_test versions
[x] #423 Consume null-safe over_react v5 and over_react_test v3
[x] #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.Build: https://ci.webfilings.com/build/4915383 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4915383/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/4915383 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4915383/latest Pipeline: No Pipeline This minor release includes the following changes:
[x] #390 FEA-2422: Allow setting a default timeout for all requests
[x] #408 Add changelog entry for 5.1.0
[x] #410 RM-208849 Release w_transport 5.1.0
Notes created on Thursday, August 31 10:03 PM UTC
defaultTimeoutThreshold top level field to add a timeout for all requests by default.Build: https://ci.webfilings.com/build/4872668 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4872668/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/4872668 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4872668/latest Pipeline: No Pipeline This patch release includes the following changes:
[x] #404 Nullable fixes
[x] #406 RM-208795 Release w_transport 5.0.1
Notes created on Saturday, August 19 04:09 PM UTC
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.Build: https://ci.webfilings.com/build/4871252 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4871252/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/4871252 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4871252/latest Pipeline: No Pipeline This major release includes the following changes:
[x] #397 FEDX-60 : Updated Null safety
[x] #402 Update changelog
[x] #403 RM-190883 Release w_transport 5.0.0
Notes created on Friday, August 18 07:21 PM UTC
.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.Build: https://ci.webfilings.com/build/4501075 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4501075/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/4501075 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4501075/latest Pipeline: No Pipeline This patch release includes the following changes:
[x] #384 Raise analyzer minimum & unpin meta
[x] #387 Pin mockito 5
[x] #388 FEA-1542: Suggest using .streamGet() for binary responses
.streamGet() for binary responses[x] #389 FEA-1543: Run CI on newer Dart SDK versions
[x] #391 Prepare for dart_dev v4.0.0
[x] #393 FEA-1797: Bug fix for the send method's body param on fall through requests
send method's body param on fall through requests[x] #394 RM-167470 Release w_transport 4.1.6
Notes created on Wednesday, April 26 03:21 PM UTC
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()).Build: https://ci.webfilings.com/build/4054445 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4054445/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/4054445 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4054445/latest Pipeline: No Pipeline This patch release includes the following changes:
[x] #381 Mockito 5
[x] #382 RM-165920 Release w_transport 4.1.5
Notes created on Tuesday, November 08 02:24 AM UTC
Build: https://ci.webfilings.com/build/4023459 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4023459/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/4023459 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/4023459/latest Pipeline: No Pipeline This patch release includes the following changes:
[x] #378 Update references to the previous team name
[x] #379 FEA-900: Widen ranges on fluri and http_parser
fluri and http_parser[x] #380 RM-156336 Release w_transport 4.1.4
Notes created on Wednesday, October 26 06:27 PM UTC
Build: https://ci.webfilings.com/build/3821601 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3821601/latest Pipeline: No Pipeline
Build: https://ci.webfilings.com/build/3821601 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3821601/latest Pipeline: No Pipeline This patch release includes the following changes:
Notes created on Wednesday, August 10 07:52 PM UTC
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.Build: https://ci.webfilings.com/build/3707576 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3707576/latest Pipeline: https://w-r
Build: https://ci.webfilings.com/build/3707576 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3707576/latest Pipeline: https://w-rmconsole.appspot.com/release/pipeline/6236187570995200/ This patch release includes the following changes:
Notes created on Tuesday, June 28 03:57 PM UTC
Build: https://ci.webfilings.com/build/3705378 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3705378/latest Pipeline: https://w-r
Build: https://ci.webfilings.com/build/3705378 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3705378/latest Pipeline: https://w-rmconsole.appspot.com/release/pipeline/6682364787556352/ This patch release includes the following changes:
Notes created on Monday, June 27 09:09 PM UTC
Build: https://ci.webfilings.com/build/3439291 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3439291/latest Pipeline: https://w-r
Build: https://ci.webfilings.com/build/3439291 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3439291/latest Pipeline: https://w-rmconsole.appspot.com/release/pipeline/5969687312334848/ This patch release includes the following changes:
[x] #344 Bug fix: use body param in Request.send()
[x] #361 Raise Max Versions
Notes created on Wednesday, March 02 08:17 PM UTC
body parameter given to Request.send() was being ignored.
It should now be used as expected.Build: https://ci.webfilings.com/build/3277637 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3277637/latest Pipeline: https://w-r
Build: https://ci.webfilings.com/build/3277637 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3277637/latest Pipeline: https://w-rmconsole.appspot.com/release/pipeline/5205238179692544/ This patch release includes the following changes:
Notes created on Thursday, December 16 06:58 PM UTC
RegExp to ensure 2 mock request
handlers with the same pattern and regex settings are stored in a common map.[x] #339 V4: remove sockjs_client and some deprecated APIs
Build: https://ci.webfilings.com/build/3245535 Skynet Results: https://wf-skynet-hrd.appspot.com/apps/test/smithy/3245535/latest Pipeline: https://w-rmconsole.appspot.com/release/pipeline/5101938511970304/ This major release includes the following changes:
[x] #339 V4: remove sockjs_client and some deprecated APIs
[x] #348 DE-690: Delete docs.yml file created for Dev Portal.
[x] #351 Widen Dependency Ranges Blocking Dart 2.13
[x] #354 Raise the Dart SDK minimum to at least 2.11.0
[x] #359 RM-109516 Release w_transport 4.0.0
Notes created on Thursday, December 02 08:03 PM UTC
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.This patch release includes the following changes:
This patch release includes the following changes:
Notes created on Thursday, October 11 06:13 PM UTC
This patch release includes the following changes:
This patch release includes the following changes:
[x] #319 AF-1711 Update changelog for v3.2.6
[x] #320 AF-1899 Dart 2 compatibility
[x] #321 update build
[x] #323 AF-1708 Release w_transport 3.2.7
Notes created on Wednesday, October 10 09:06 PM UTC
This patch release includes the following changes:
This patch release includes the following changes:
[x] #314 af_new_drydock_image
[x] #316 AF-1573 Raise sockjs_client_wrapper minimum to 1.0.4
sockjs_client_wrapper minimum to 1.0.4[x] #318 AF-345 Release w_transport 3.2.6
Notes created on Thursday, July 19 03:20 PM UTC
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.
This patch release includes the following changes:
This patch release includes the following changes:
examples/
examples/Notes created on Thursday, May 17 05:54 PM UTC
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.
This patch release includes the following changes:
This patch release includes the following changes:
Notes created on Thursday, May 17 01:54 PM UTC
May 16th, 2018
MultipartRequest was previously
adding every field to the FormData twice - this has been fixed.[x] #303 BUILDTOOLS-2329: Update Dockerfile to mirror smithy.yaml
Thursday, April 26 01:23 PM UTC
April 25th, 2018
[x] #301 WP-6212 Update HttpRequestTypes.md
Friday, April 20 07:20 PM UTC
April 20th, 2018
[x] #299 WP-5850 Use hasProperty to detect sockjs.js
Monday, January 29 07:24 PM UTC
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.[x] #296 WP-5258 Automatically use sockjs_client_wrapper if possible.
aviary.yaml to CODEOWNERSWednesday, January 10 06:48 PM UTC
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.
[x] #290 WP-5202 Switch mock-aware requests to real requests before finalizing them
Monday, September 25 02:19 PM UTC
[x] #284 WP-4759 Add explicit dependency on meta
Monday, July 24 03:25 PM UTC
[x] #279 WP-4674 Address or ignore deprecated uses
Wednesday, July 19 07:23 PM UTC
[x] #278 WP-4672 Dart dev compiler compatibility
Wednesday, July 12 02:57 PM UTC
[x] #275 WP-4462 add close_sinks and cancel_subscriptions lints to 3.x
Thursday, July 06 10:21 PM UTC
This patch release includes the following changes:
This patch release includes the following changes:
Notes created on Tuesday, July 04 01:54 PM UTC
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#303
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#303
BaseRequest.done on cancellationNotes created on Monday, March 20 08:33 PM UTC
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.Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#302
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#302
Notes created on Monday, February 06 03:30 PM UTC
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.Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#301
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#301
Notes created on Thursday, January 19 06:28 PM UTC
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.Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#300
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#300
Upgrade guide: https://github.com/Workiva/w_transport/blob/master/docs/upgrade-guides/v3.0.0.md
Notes created on Tuesday, October 25 04:06 PM UTC
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![x] #286 WP-4787 Add explicit dependency on meta (2.x)
Monday, July 24 03:07 PM UTC
[x] #272 WP-4632 Global WebSocket monitor
Wednesday, July 19 07:29 PM UTC
This patch release includes the following changes:
This patch release includes the following changes:
Notes created on Friday, June 30 09:44 PM UTC
Changelog: https://github.com/Workiva/w_transport/blob/2.9.7/CHANGELOG.md#297
Changelog: https://github.com/Workiva/w_transport/blob/2.9.7/CHANGELOG.md#297
BaseRequest.done on cancellation (BACKPATCH)Notes created on Monday, March 20 04:49 PM UTC
Changelog: https://github.com/Workiva/w_transport/blob/2.9.6/CHANGELOG.md#296
Changelog: https://github.com/Workiva/w_transport/blob/2.9.6/CHANGELOG.md#296
Changelog: https://github.com/Workiva/w_transport/blob/2.9.5/CHANGELOG.md#295
Changelog: https://github.com/Workiva/w_transport/blob/2.9.5/CHANGELOG.md#295
Notes created on Monday, January 23 09:44 PM UTC
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#294
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#294
Notes created on Friday, October 14 05:11 PM UTC
October 14, 2016
Future returned from WSocket.cancel() no longer waits for
the WebSocket to be closed.Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#293
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#293
Notes created on Thursday, September 08 06:24 PM UTC
September 8, 2016
StateError may be thrown due to a Completer being
completed more than once. This is fixed now.Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#292
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#292
Notes created on Thursday, August 11 05:42 PM UTC
August 11, 2016
http_parser dependency to speed up and/or
fix downstream consumers experiencing version conflicts.Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#291
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#291
Notes created on Tuesday, August 02 08:22 PM UTC
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.Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#290
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#290
Notes created on Tuesday, July 26 08:46 PM UTC
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.
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#280
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#280
Notes created on Thursday, July 21 06:22 PM UTC
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.
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#271
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#271
Notes created on Thursday, July 21 03:01 PM UTC
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;
};
[x] #163 CP-1974 Restore & deprecate autoRetry.backOff.duration for backwards compatibility
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#270
Notes created on Thursday, June 23 07:57 PM UTC
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.
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#260
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#260
Notes created on Tuesday, June 21 05:08 PM UTC
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.
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#251
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#251
Notes created on Thursday, June 16 09:13 PM UTC
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.Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#250
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#250
Notes created on Wednesday, June 15 08:36 PM UTC
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.
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#240
Changelog: https://github.com/Workiva/w_transport/blob/master/CHANGELOG.md#240
Notes created on Wednesday, May 04 09:10 PM UTC
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.
One column per quarter.