dsherret / dax

Cross-platform shell tools for Deno and Node.js inspired by zx.
MIT License
964 stars 33 forks source link

feat: ability to abort request's response #229

Closed dsherret closed 5 months ago

dsherret commented 5 months ago

Adds the ability to abort a request's response (note: use .timeout(...) to do timeouts):

const response = await $.request("https://plugins.dprint.dev/info.json");

response.abort();

const text = await response.text(); // throws because aborted