Skip to content

Commit

Permalink
Changes made in both Readme files (#2016)
Browse files Browse the repository at this point in the history
Fixes #2012

<!-- Write down your pull request descriptions. -->

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [ ] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [ ] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [ ] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

Replaced **IOClientAdapter** to **IOHttpClientAdapter** on both readme
and replaced **BrowserClientAdapter** to **BrowserHttpClientAdapter** on
both readme.
  • Loading branch information
someshwar16 authored Nov 1, 2023
1 parent 05a0f9f commit d671177
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dio/README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ void main() {
我们通过 `HttpClientAdapter``Dio``HttpClient` 解耦,
这样一来便可以自由定制 HTTP 请求的底层实现。
Dio 使用 `IOHttpClientAdapter` 作为原生平台默认的桥梁,
`BrowserClientAdapter` 作为 Web 平台的桥梁。
`BrowserHttpClientAdapter` 作为 Web 平台的桥梁。
你可以通过 `HttpClientAdapter()` 来根据平台创建它们。

```dart
Expand All @@ -704,13 +704,13 @@ dio.httpClientAdapter = HttpClientAdapter();
```dart
import 'package:dio/browser.dart';
// ...
dio.httpClientAdapter = BrowserClientAdapter();
dio.httpClientAdapter = BrowserHttpClientAdapter();
```
- 对于原生平台:
```dart
import 'package:dio/io.dart';
// ...
dio.httpClientAdapter = IOClientAdapter();
dio.httpClientAdapter = IOHttpClientAdapter();
```

[示例](../example/lib/adapter.dart) 中包含了一个简单的自定义桥接。
Expand Down
6 changes: 3 additions & 3 deletions dio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ There is an example for [customizing Transformer](../example/lib/transformer.dar
We can use any `HttpClient` not just `dart:io:HttpClient` to make HTTP requests.
And all we need is providing a `HttpClientAdapter`.
The default `HttpClientAdapter` for Dio is `IOHttpClientAdapter` on native platforms,
and `BrowserClientAdapter` on the Web platform.
and `BrowserHttpClientAdapter` on the Web platform.
They can be initiated by calling the `HttpClientAdapter()`.

```dart
Expand All @@ -729,13 +729,13 @@ If you want to use platform adapters explicitly:
```dart
import 'package:dio/browser.dart';
// ...
dio.httpClientAdapter = BrowserClientAdapter();
dio.httpClientAdapter = BrowserHttpClientAdapter();
```
- For native platforms:
```dart
import 'package:dio/io.dart';
// ...
dio.httpClientAdapter = IOClientAdapter();
dio.httpClientAdapter = IOHttpClientAdapter();
```

[Here](../example/lib/adapter.dart) is a simple example to custom adapter.
Expand Down

0 comments on commit d671177

Please sign in to comment.