-
-
Notifications
You must be signed in to change notification settings - Fork 685
Open
Labels
semver-majorFeatures or fixes that will be included in the next semver major releaseFeatures or fixes that will be included in the next semver major release
Description
Based on my experience working with undici through nxt-undici and building a more advanced client on top undici I have come to a few realizations that have semver major implications:
onBodySentandonRequestSentare huge footguns. Remove it. (just wrap the body)interceptorsare weird and overengineered. Remove it. (just wrap dispatchers)onConnectis confusing and should be renamed or something to make it more intuitive. Possibly entirely removed.bodyshould support a factory method (important for retries and redirects).onResponseStarted. Why is onHeaders insufficient?maxRedirectionsandRedirectHandlershould not be part of core/dispatcher APi. Move to the api methods.- Change hooks signature to accept objects instead of params.
- Rename disatpcher param to dispatch which is just a function (opts, handler) => {}
mcollina and metcoder95
Metadata
Metadata
Assignees
Labels
semver-majorFeatures or fixes that will be included in the next semver major releaseFeatures or fixes that will be included in the next semver major release