# dio_web_adapter 2.0.0

An adapter that supports Dio on Web.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'dio_web_adapter:2.0.0'
```
Published: 2024-08-13T09:54:05.857511Z
Expected archive SHA-256: 33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8

Available in cache; verification: upstream_checksum
## Direct dependencies
- dio: ^5.0.0
- http_parser: ^4.0.0
- meta: ^1.5.0
- web: >=0.5.0 <2.0.0

## Package README (untrusted upstream documentation)
# dio_web_adapter

[![pub package](https://img.shields.io/pub/v/dio_web_adapter.svg)](https://pub.dev/packages/dio_web_adapter)
[![likes](https://img.shields.io/pub/likes/dio_web_adapter)](https://pub.dev/packages/dio_web_adapter/score)
[![popularity](https://img.shields.io/pub/popularity/dio_web_adapter)](https://pub.dev/packages/dio_web_adapter/score)
[![pub points](https://img.shields.io/pub/points/dio_web_adapter)](https://pub.dev/packages/dio_web_adapter/score)

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](https://pub.dev/packages/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](https://pub.dev/packages/dio_web_adapter/install).

### Example


```dart
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);
}
```

## Changelog
## Unreleased

*None.*

## 2.0.0

- Supports the WASM environment. Users should upgrade the adapter with
  `dart pub upgrade` or `flutter pub upgrade` to use the WASM-supported version.

## 1.0.1

- Improves warning logs on the Web platform.

## 1.0.0

- Split the Web ability from the `package:dio`.







 
