dio
A powerful HTTP networking package, supports Interceptors, Aborting and canceling a request, Custom adapters, Transformers, etc.
5.11.0
1000K downloads/mo
#8 most downloaded on pub.dev
cfug/dio
What this package is like to depend on
Last release 29 days ago
25 Jul 2026
Release timing varies
gaps range from 3 weeks to 6 months
Some releases are documented
notes for 69 of 133 stable releases
2 versions withdrawn
withdrawn after publishing
8 years old
150 releases · first in 2018
4 releases in the last 12 months
see the full history below
Release timeline
150 releases · Apr 2018 to Jul 2026Releases
latest 60 of 150-
5.11.025 Jul 2026Release notes
Open source →What's new
- Add
queryandqueryUriconvenience methods for the HTTP QUERY method defined in RFC 10008,
which allows a request body for safe, idempotent queries. - Fix
FusedTransformer(the default transformer) throwing aFormatException
on an empty response body when a customresponseDecoderis set. It now
returns an empty result, consistent withSyncTransformerand
BackgroundTransformer. - Fix concurrent requests hanging or reporting uncaught errors when an
interceptor shares a failing Future, such as in request deduplication.
Release notes
Open source →- Add
queryandqueryUriconvenience methods for the HTTP QUERY method defined in RFC 10008, which allows a request body for safe, idempotent queries. - Fix
FusedTransformer(the default transformer) throwing aFormatExceptionon an empty response body when a customresponseDecoderis set. It now returns an empty result, consistent withSyncTransformerandBackgroundTransformer. - Fix concurrent requests hanging or reporting uncaught errors when an interceptor shares a failing Future, such as in request deduplication.
- Add
-
5.10.029 Jun 2026Release notes
Open source →What's new
- Fix
FormData.readAsBytesexcessive memory usage with large payloads by replacing the O(n²)reduce+spread approach with a pre-allocatedUint8List. - Fix request hanging indefinitely when async interceptor callbacks throw without calling the handler.
- Fix
HttpException: Connection closed before full header was receivedbeing reported asDioExceptionType.unknown. - Add
transformTimeoutto bound long-running response transformations, including background JSON decoding.
On web, timeout handling is best-effort because synchronous JavaScript work cannot be preempted. - Fix
FormData.clone()droppingboundaryNameandcamelCaseContentDisposition, so a retried multipart request now keeps the original options instead of silently falling back to the defaults. - Fix
QueuedInterceptorstalling its queue forever when the active request is cancelled while its callback is still pending (never callsnext/resolve/reject), which blocked every subsequent request routed through the interceptor. - Fix
ErrorInterceptorHandler.reject(..., true)not continuing to following error interceptors in queued interceptors.
Release notes
Open source →- Fix
FormData.readAsBytesexcessive memory usage with large payloads by replacing the O(n²)reduce+spread approach with a pre-allocatedUint8List. - Fix request hanging indefinitely when async interceptor callbacks throw without calling the handler.
- Fix
HttpException: Connection closed before full header was receivedbeing reported asDioExceptionType.unknown. - Add
transformTimeoutto bound long-running response transformations, including background JSON decoding. On web, timeout handling is best-effort because synchronous JavaScript work cannot be preempted. - Fix
FormData.clone()droppingboundaryNameandcamelCaseContentDisposition, so a retried multipart request now keeps the original options instead of silently falling back to the defaults. - Fix
QueuedInterceptorstalling its queue forever when the active request is cancelled while its callback is still pending (never callsnext/resolve/reject), which blocked every subsequent request routed through the interceptor. - Fix
ErrorInterceptorHandler.reject(..., true)not continuing to following error interceptors in queued interceptors.
- Fix
-
5.9.202 Mar 2026Release notes
Open source →- Fixes
kIsWebacross different Flutter SDKs. - Provides
httpVersioninResponse.extrawhen usingIOHttpClientAdapter.
- Fixes
-
5.9.127 Jan 2026Release notes
Open source →- Add
requestUrlandresponseUrlparameters toLogInterceptorfor more precise control over URL logging. - Fix
QueuedInterceptorhanging indefinitely when interceptor callbacks throw synchronous exceptions.
- Add
-
5.9.007 Aug 2025Release notes
Open source →- Do not allow updating the error field after a cancel token has canceled.
- Allow passing an initial interceptors list to the constructor of
Interceptors. - Use
package:mimeto help determine thecontent-typeofMultipartFilebase on the providedfilename.
-
5.8.029 Jan 2025 withdrawnRelease notes
Open source →- Update comments and strings with
MultipartFile. - Removes redundant warnings when composing request options on Web.
- Fixes boundary inconsistency in
FormData.clone(). - Support
FileAccessModeinDio.downloadandDio.downloadUrito change download file opening mode. - Fix
ListParamequality by using theDeepCollectionEquality. - Enables configuring the logging details of
DioExceptionglobally and locally. - Enables using
Dio.cloneto reuse base options, client adapter, interceptors, and transformer, in a newDioinstance.
- Update comments and strings with
-
5.8.0+129 Jan 2025 -
5.7.003 Sep 2024Release notes
Open source →- Graceful handling of responses with nonzero
Content-Length,Content-Typethat is json, and empty payload.- Empty responses are now transformed to
null.
- Empty responses are now transformed to
- Graceful handling of responses with nonzero
-
5.6.013 Aug 2024Release notes
Open source →- Supports the WASM environment. Users should upgrade the adapter with
dart pub upgradeorflutter pub upgradeto use the WASM-supported version.
- Supports the WASM environment. Users should upgrade the adapter with
-
5.5.003 Jul 2024Release notes
Open source →- Raise the min Dart SDK version to 2.18.0.
- Add constructor for
DioExceptionType.badCertificate. - Create type alias
DioMediaTypeforhttp_parser'sMediaType. - Fix the type conversion regression when using
MultipartFile.fromBytes. - Split the Web implementation to
package:dio_web_adapter. - Add FusedTransformer for improved performance when decoding JSON.
- Set FusedTransformer as the default transformer.
- Improves
InterceptorState.toString(). - If the
CancelTokengot canceled before making requests, throws the exception directly rather than cut actual HTTP requests afterward. - Catch
MediaTypeparse exception inTransformer.isJsonMimeType. - Improves warning logs on the Web platform.
- Improves memory allocating when using
CancelToken.
-
5.5.0+104 Jul 2024Release notes
Open source →- Fix WASM compile errors after moving the web implementation to
dio_web_adapter.
- Fix WASM compile errors after moving the web implementation to
-
5.4.313 Apr 2024Release notes
Open source →- Remove sockets detach in
IOHttpClientAdapter. - Allows to define
FormData.boundaryNameinstead of the default--dio-boundary-.
- Remove sockets detach in
-
5.4.3+114 Apr 2024 -
5.4.226 Mar 2024 withdrawnRelease notes
Open source →- Fix
receiveTimeoutthrows exception after the request has been cancelled. - Catch sync/async exceptions in interceptors' handlers.
- Throws precise
StateErrorfor handler's duplicated calls.
- Fix
-
5.4.2+128 Mar 2024 -
5.4.118 Feb 2024Release notes
Open source →- Provide fix suggestions for
dart fix. - Fix
receiveTimeoutfor streamed responses. - Fix cancellation for streamed responses and downloads when using
IOHttpClientAdapter. - Fix receive progress for streamed responses and downloads when using
IOHttpClientAdapter. - Support relative
baseUrlon the Web platform. - Avoid fake uncaught exceptions during debugging with IDEs.
- Provide fix suggestions for
-
5.4.030 Nov 2023Release notes
Open source →- Improve
SyncTransformer's stream transform. - Allow case-sensitive header keys with the
preserveHeaderCaseflag through options. - Fix
receiveTimeoutfor theIOHttpClientAdapter. - Fix
receiveTimeoutfor thedownloadmethod ofDioForNative. - Improve the stream byte conversion.
- Improve
-
5.3.422 Nov 2023Release notes
Open source →- Raise warning for
Maps other thanMap<String, dynamic>when encoding request data. - Improve exception messages.
- Allow
ResponseDecoderandRequestEncoderto be async. - Ignores
Duration.zerotimeouts.
- Raise warning for
-
5.3.322 Sep 2023Release notes
Open source →- Fix failing requests throw
DioExceptions with.unknowninstead of.connectionErroronSocketException. - Removes the accidentally added
optionsargument forOptions.compose. - Fix wrong formatting of multi-value header in
BrowserHttpClientAdapter. - Add warning in debug mode when trying to send data with a
GETrequest in web. - Reduce cases in which browsers would trigger a CORS preflight request.
- Add warnings in debug mode when using
sendTimeoutandonSendProgresswith an empty request body. - Fix
receiveTimeoutnot working correctly on web. - Fix
ImplyContentTypeInterceptorcan be removed byInterceptors.clear()by default.
- Fix failing requests throw
-
5.3.203 Aug 2023Release notes
Open source →- Revert removed
downloadforDioMixin. - Fix for
Dio.downloadnot cleaning the file on data handling error.
- Revert removed
-
5.3.131 Jul 2023Release notes
Open source →- Improve package descriptions and code formats.
- Improve comments.
- Fix error when cloning
MultipartFilefromFormDatawith regression test. - Deprecate
MultipartFileconstructor in favorMultipartFile.fromStream. - Add
FormData.clone.
-
5.3.018 Jul 2023Release notes
Open source →- Remove
httpfromdev_dependencies. - Add support for cloning
MultipartFilefromFormData. - Only produce null response body when
ResponseType.json.
- Remove
-
5.2.110 Jun 2023 -
5.2.1+113 Jun 2023 -
5.2.006 Jun 2023Release notes
Open source →- Make
LogInterceptorprints in DEBUG mode (when the assertion is enabled) by default. - Deprecate
DioErrorin favor ofDioException. - Fix
IOHttpClientAdapter.onHttpClientCreateRepeated calls IOHttpClientAdapter.onHttpClientCreatehas been deprecated and is scheduled for removal in Dio 6.0.0 - Please use the replacementIOHttpClientAdapter.createHttpClientinstead.- Using
CancelTokenno longer closes and re-createsHttpClientfor each request whenIOHttpClientAdapteris used. - Fix timeout handling for browser
receiveTimeout. - Improve performance when sending binary data (
List<int>/Uint8List).
- Make
-
5.2.0+107 Jun 2023 -
5.1.208 May 2023 -
5.1.130 Mar 2023Release notes
Open source →- Revert changes to
CancelToken.cancel()behavior, as a result theDioErrorprovided by theCancelToken.cancelErrordoes not contain useful information when the token was not used with a request. - Fix wrong
ListFormatbeing used for comparison during encoding ofFormDataandapplication/x-www-form-urlencoded, resulting in potential wrong output encoding forListFormat.multiandListFormat.multiCompatiblesince Dio 4.0.x. - Respect
Options.listFormatwhen encodingx-www-url-encodedcontent.
- Revert changes to
-
5.1.027 Mar 2023Release notes
Open source →- Fix double-completion when using
connectionTimeouton web platform. - Allow defining adapter methods through their constructors.
- Fix
FormDataencoding regression for maps with dynamic keys, introduced in 5.0.3. - Mark several static
DioMixinfunctions as@internal. - Make
DioError.stackTracenon-nullable. - Ensure
DioError.stackTracealways points to the correct call site.
- Fix double-completion when using
-
5.0.317 Mar 2023Release notes
Open source →- Imply
List<Map>as JSON content inImplyContentTypeInterceptor. - Fix
FormDataencoding for collections and objects.
- Imply
-
5.0.210 Mar 2023Release notes
Open source →- Improve code formats according to linter rules.
- Remove the force conversion for the response body.
- Fix
DioErrorType.cancelinInterceptors. - Fix wrong encoding of collection query parameters.
- Fix "unsupported operation" error on web platform.
-
5.0.124 Feb 2023Release notes
Open source →- Add
ImplyContentTypeInterceptoras a default interceptor. - Add
Headers.multipartFormDataContentTypefor headers usage. - Fix variable shadowing of
withCredentialsinbrowser_adapter.dart.
- Add
-
5.0.013 Feb 2023Release notes
Open source →- Raise the min Dart SDK version to 2.15.0 to support
BackgroundTransformer. - Change
Dio.transformerfromDefaultTransformertoBackgroundTransformer. - Remove plain ASCII check in
FormData. - Allow asynchronous method with
savePath. - Allow
datain all request methods. - A platform independent
HttpClientAdaptercan now be instantiated by doingdio.httpClientAdapter = HttpClientAdapter();. - Add
ValidateCertificateto handle certificate pinning better. - Support
Content-Dispositionheader case sensitivity.
Breaking Changes
- The default charset
utf-8inHeaderscontent type constants has been removed. BaseOptions.setRequestContentTypeWhenNoPayloadhas been removed.- Improve
DioErrors. There are now more cases in which the inner original stacktrace is supplied. HttpClientAdaptermust now be implemented instead of extended.- Any classes specific to
dart:ioplatforms can now be imported viaimport 'package:dio/io.dart';. Classes specific to web can be imported viaimport 'package:dio/browser.dart';. connectTimeout,sendTimeout, andreceiveTimeoutare nowDurations.
- Raise the min Dart SDK version to 2.15.0 to support
-
4.0.631 Mar 2022 -
4.0.529 Mar 2022Release notes
Open source →- require Dart
2.12.1which fixes exception handling for secure socket connections (#45214) - Only delete file if it exists when downloading.
- Fix
BrowserHttpClientAdaptercanceled hangs - Correct JSON MIME Type detection
- [Web] support send/receive progress in web platform
- refactor timeout logic
- use 'arraybuffer' instead of 'blob' for xhr requests in web platform
- require Dart
-
4.0.5-beta128 Nov 2021 pre-releaseNothing published for this version
-
4.0.422 Nov 2021 -
4.0.314 Nov 2021 -
4.0.214 Nov 2021 -
4.0.2-beta131 Oct 2021 pre-releaseNothing published for this version
-
4.0.123 Oct 2021Release notes
Open source →- merge pr #1177 #1196 #1205 #1224 #1225 #1227 #1256 #1263 #1291
- fix #1257
-
4.0.028 Mar 2021 -
4.0.0-prev320 Mar 2021 pre-release -
4.0.0-prev218 Mar 2021 pre-release -
4.0.0-prev117 Mar 2021 pre-releaseRelease notes
Open source →Interceptors: Add
handlerfor Interceptor APIs which can specify the subsequent interceptors processing logic more finely (whether to skip them or not). -
4.0.0-beta709 Mar 2021 pre-release -
4.0.0-beta607 Mar 2021 pre-release -
4.0.0-beta505 Mar 2021 pre-release -
4.0.0-beta403 Mar 2021 pre-release -
4.0.0-beta302 Mar 2021 pre-releaseRelease notes
Open source →- rename CollectionFormat to ListFormat
- change default value of Options.listFormat from
multiCompatibletomulti - add upload_stream_test.dart
-
4.0.0-beta201 Mar 2021 pre-releaseRelease notes
Open source →- support null-safety
- add
CollectionFormatconfiguration in Options - add
fetchAPI for Dio - rename DioErrorType enums from uppercase to camel style
- rename 'Options.merge' to 'Options.copyWith'
-
4.0.0-beta128 Feb 2021 pre-releaseNothing published for this version
-
3.0.1007 Aug 2020 -
3.0.924 Feb 2020 -
3.0.829 Dec 2019 -
3.0.8-dev.129 Dec 2019 pre-releaseNothing published for this version
-
3.0.725 Nov 2019Release notes
Open source →- Merge #574 : fix upload image header error, support both oss and other server
-
3.0.622 Nov 2019 -
3.0.519 Nov 2019 -
3.0.429 Oct 2019