Skip to content

Commit 023d9d0

Browse files
committed
feat: 1.0.0-dev.5
1 parent 21da404 commit 023d9d0

3 files changed

Lines changed: 40 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
1+
## 1.0.0-dev.5
2+
3+
- **BREAKING**: Renamed `RequestInit` to `FetchOptions`.
4+
This is done to make emphasis, that `fetch` and `Request` have different
5+
(default) behaviors.
6+
- Added `Request`.
7+
- Added `RequestDuplex`. This adds support for request streaming in supported
8+
browsers.
9+
- Added `ReadableStreamSource`. This allows you to create custom
10+
`ReadableStream`s, that is required for request streaming.
11+
- Added `ReadableStreamDefaultController`.
12+
- Added `ReadableStreamSource` class that helps you to create custom source
13+
for `ReadableStream`s. It can be created from Dart's`Stream`.
14+
- Added `RequestCache`.
15+
- Added `RequestDestination`.
16+
- Added missing options to `RequestMode` and added docs.
17+
- Added `FetchOptions` and `RequestOptions` with corresponding docs from MDN.
18+
- Compatibility layer:
19+
- **BREAKING**: Renamed `createRequestInit` to `createFetchOptions`
20+
- Added `createRequestOptions`.
21+
- Added `createReadableStream`.
22+
- Added `createReadableStreamSourceFromStream`.
23+
- Fixed dev dependencies versions, to allow running on Dart 2.19.
24+
25+
126
## 1.0.0-dev.4
227

328
- Fixes for `js.Iterator` with Arrays. (Resolves issue with `Headers`).
429

530
## 1.0.0-dev.3
631

7-
- **BREAKING**: Renamed extensions from `<Class>Extension` to `<Class>InstanceMembers`.
32+
- **BREAKING**: Renamed extensions from `<Class>Extension` to
33+
`<Class>InstanceMembers`.
834
- Added `fetch_api.compatibility_layer` library to support Dart 2.19.
935
- Added `createHeadersFromMap`
1036
- Added `createHeadersFromArray`

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
# Fetch API.
22

3-
> ⚠️ Requires Dart 2.19 or higher.
4-
>
5-
> Some methods are exclusive for Dart 3.0, see [compatibility_layer](lib/compatibility_layer.dart) for more info.
3+
> Some methods are working only with Dart 3.0, see
4+
> [compatibility_layer](lib/compatibility_layer.dart) for more info.
65
7-
This package provides JavaScript bindings to [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
6+
This package provides JavaScript bindings to
7+
[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
88

99
## Features
1010

11-
* Full request parameters coverage
12-
* Support canceling requests
11+
* Full fetch options / request parameters coverage
12+
* Cancel requests via `AbortController`.
1313
* Read response
14-
* As text
14+
* As text (`String`)
1515
* As `Blob`
1616
* As `Stream` of `Uint8List`
17-
* Support streaming of data
17+
* Response streaming
18+
* Request streaming (check [compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Request#browser_compatibility))
1819
* Get access to redirect status
1920
* Support non-`200` responses
2021

2122
## Some notes about `fetch` and `Request`
2223

23-
`fetch` and `Request` have same options but different semantics, e.g. fetch`'s
24+
`fetch` and `Request` have same options but different semantics, e.g. `fetch`'s
2425
default mode is `no-cors` while `Request` is `cors`. Therefore options objects
2526
for this function and constructor made as different classes.
2627
For more info about that read [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: fetch_api
22
description: JavaScript bindings for Fetch API, allowing a flexible HTTP requests.
3-
version: 1.0.0-dev.4
3+
version: 1.0.0-dev.5
44
homepage: https://github.com/Zekfad/fetch_api
55
repository: https://github.com/Zekfad/fetch_api
66
issue_tracker: https://github.com/Zekfad/fetch_api/issues
@@ -16,6 +16,6 @@ dependencies:
1616
js: ^0.6.5
1717

1818
dev_dependencies:
19-
build_runner: ^2.4.0
20-
build_web_compilers: ^4.0.0
19+
build_runner: '>=2.3.3'
20+
build_web_compilers: '>=3.2.7'
2121
zekfad_lints: ^1.2.0

0 commit comments

Comments
 (0)