dio_web_adapter 1.0.1 copy "dio_web_adapter: ^1.0.1" to clipboard
dio_web_adapter: ^1.0.1 copied to clipboard

Platformweb

An adapter that supports Dio on Web.

dio_web_adapter #

pub package likes popularity pub points

If you encounter bugs, consider fixing it by opening a PR or at least contribute a failing test case.

This package contains adapters for Dio which enables you to use the library on the Web platform.

Versions compatibility #

Version Dart (min) Flutter (min)
1.x 2.18.0 3.3.0
2.x 3.3.0 3.19.0

Note: the resolvable version will be determined by the SDK you are using. Run dart pub upgrade or flutter pub upgrade to get the latest resolvable version.

Get started #

The package is embedded into the package:dio. You don't need to explicitly install the package unless you have other concerns.

Install #

Add the dio_web_adapter package to your pubspec dependencies.

Example #

import 'package:dio/dio.dart';
// The import is not required and could produce lints.
// import 'package:dio_web_adapter/dio_web_adapter.dart';

void main() async {
  final dio = Dio();
  dio.httpClientAdapter = BrowserHttpClientAdapter(withCredentials: true);

  // Make a request.
  final response = await dio.get('https://dart.dev');
  print(response);
}
0
likes
130
pub points
80%
popularity

Publisher

unverified uploader

An adapter that supports Dio on Web.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#dio #http #network #web #wasm

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dio, http_parser, meta

More

Packages that depend on dio_web_adapter