You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Supported objects: `Uint8Array`, `PathRef`, `WritableStream`, function that returns a `WritableStream`, any object that implements `[$.symbols.writable](): WritableStream`
193
+
194
+
Or input redirects:
195
+
196
+
```ts
197
+
// strings
198
+
const data ="my data in a string";
199
+
const bytes =await$`gzip < ${data}`;
200
+
201
+
// paths
202
+
const path =$.path("file.txt");
203
+
const bytes =await$`gzip < ${path}`;
204
+
205
+
// requests (this example does not make the request until after 5 seconds)
Supported objects: `string`, `Uint8Array`, `PathRef`, `RequestBuilder`, `ReadableStream`, function that returns a `ReadableStream`, any object that implements `[$.symbols.readable](): ReadableStream`
// or as a redirect... this sleeps 5 seconds, then makes
731
+
// request and redirects the output to the command
732
+
await$`sleep 5 && deno run main.ts < ${request}`;
733
+
```
734
+
673
735
See the [documentation on `RequestBuilder`](https://deno.land/x/dax/src/request.ts?s=RequestBuilder) for more details. It should be as flexible as `fetch`, but uses a builder API (ex. set headers via `.header(...)`).
0 commit comments