Skip to content

Commit

Permalink
docs: fix stream body request type
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto committed Nov 6, 2024
1 parent 17c4b73 commit 5432594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rhttp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ await Rhttp.post(

**Stream**

Pass a `Stream<int>` to the `HttpBody.stream` constructor.
Pass a `Stream<List<int>>` to the `HttpBody.stream` constructor.

It is recommended to also provide a `length` to automatically set the `Content-Length` header.

```dart
await Rhttp.post(
'https://example.com',
body: HttpBody.stream(
Stream.fromIterable([0, 1, 2]),
Stream.fromIterable([[1, 2, 3]]),
length: 3,
),
);
Expand Down

0 comments on commit 5432594

Please sign in to comment.