Skip to content

Commit 5ab71ce

Browse files
committed
docs: add fetch.pipe usage example
1 parent 3b3e63b commit 5ab71ce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/api.md

+7
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ package.
142142
const resp = await fetch('https://medv.io')
143143
```
144144

145+
We've attached a minor adjustment to the `fetch` API to make it more zx-friendly in pipe chains:
146+
147+
```js
148+
const p1 = fetch('https://example.com').pipe($`cat`)
149+
const p2 = fetch('https://example.com').pipe`cat`
150+
```
151+
145152
## `question()`
146153

147154
A wrapper around the [readline](https://nodejs.org/api/readline.html) package.

0 commit comments

Comments
 (0)