Skip to content

Commit

Permalink
Fix typos and improve the document (#1925)
Browse files Browse the repository at this point in the history
<!-- Write down your pull request descriptions. -->

- Fix typos.
- Replace the less common "asynchronized" with the more common
"asynchronous" to make the analyzer happy.
- Replace non-breaking spaces (NBSP) with a regular space.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] 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
- [ ] I have updated the documentation (if necessary)
- [x] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->
  • Loading branch information
hgraceb authored Aug 8, 2023
1 parent 8039ca3 commit 3db6af5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ See the [Migration Guide][] for the complete breaking changes list.**
- Improve package descriptions and code formats.
- Improve comments.
- Fix error when cloning `MultipartFile` from `FormData` with regression test.
- Deprecate `MulitpartFile` constructor in favor `MultipartFile.fromStream`.
- Deprecate `MultipartFile` constructor in favor `MultipartFile.fromStream`.
- Add `FormData.clone`.

## 5.3.0
Expand Down Expand Up @@ -89,14 +89,14 @@ See the [Migration Guide][] for the complete breaking changes list.**

- Add `ImplyContentTypeInterceptor` as a default interceptor.
- Add `Headers.multipartFormDataContentType` for headers usage.
- Fix variable shadowing of `withCredentials` in `browser_adapers.dart`.
- Fix variable shadowing of `withCredentials` in `browser_adapter.dart`.

## 5.0.0

- Raise the min Dart SDK version to 2.15.0 to support `BackgroundTransformer`.
- Change `Dio.transformer` from `DefaultTransformer` to `BackgroundTransformer`.
- Remove plain ASCII check in `FormData`.
- Allow asynchronized method with `savePath`.
- Allow asynchronous method with `savePath`.
- Allow `data` in all request methods.
- A platform independent `HttpClientAdapter` can now be instantiated by doing
`dio.httpClientAdapter = HttpClientAdapter();`.
Expand Down Expand Up @@ -181,7 +181,7 @@ the subsequent interceptors processing logic more finely (whether to skip them o
## 4.0.0-beta3

- rename CollectionFormat to ListFormat
- change default value of Options.listFormat from `mutiComptible` to `multi`
- change default value of Options.listFormat from `multiCompatible` to `multi`
- add upload_stream_test.dart

## 4.0.0-beta2
Expand Down
2 changes: 1 addition & 1 deletion dio/test/options_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void main() {
});
test('options content-type', () {
const contentType = 'text/html';
const contentTypeJson = 'appliction/json';
const contentTypeJson = 'application/json';
final headers = {'content-type': contentType};
final jsonHeaders = {'content-type': contentTypeJson};

Expand Down
2 changes: 1 addition & 1 deletion dio/test/request_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void main() {
expect(response.data['query'], equals('id=12&name=wendu'));
expect(response.headers.value('single'), equals('value'));

const map = {'content': 'I am playload'};
const map = {'content': 'I am payload'};

// test post
response = await dio.postUri(
Expand Down
4 changes: 2 additions & 2 deletions plugins/native_dio_adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Inspired by the [Dart 2.18 release blog](https://medium.com/dartlang/dart-2-18-f

# Motivation

Using the native platform implementation, rather than the socket-based [`dart:io` HttpClient](https://api.dart.dev/stable/dart-io/HttpClient-class.html) implemententation, has several advantages:
Using the native platform implementation, rather than the socket-based [`dart:io` HttpClient](https://api.dart.dev/stable/dart-io/HttpClient-class.html) implementation, has several advantages:

- It automatically supports platform features such VPNs and HTTP proxies.
- It supports many more configuration options such as only allowing access through WiFi and blocking cookies.
Expand All @@ -29,7 +29,7 @@ Using the native platform implementation, rather than the socket-based [`dart:io

```dart
final dioClient = Dio();
if (Platform.isIOS || Platform.isMacOS || Platform.isAndroid) {
if (Platform.isIOS || Platform.isMacOS || Platform.isAndroid) {
dioClient.httpClientAdapter = NativeAdapter();
}
```
Expand Down

0 comments on commit 3db6af5

Please sign in to comment.