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
{{ message }}
Repository navigation
Improve documentation to make all information available in a single view #2208
A massive overhaul of our docs is welcomed, but at this point it seems a stretch for the current team. I would love if somebody volunteered for this effort.
One thing that helped me a lot when getting started with undici was the typed options in the source code itself — each class has JSDoc types that list all available options with defaults. For example, new Pool(url, options) has PoolOptions which documents every field.
As a quick reference, the high-level mapping is:
fetch() wraps Client.request(), options are mostly the same plus a few extras
request() / stream() are direct Dispatcher methods
Pool / Agent handle connection management with PoolOptions and AgentOptions
A getting started page that maps common use cases (basic fetch, streaming, custom dispatcher, mocking) to the relevant API surface would go a long way. Happy to draft something if there is interest.
opened a draft PR for a getting started guide -- #5371. covers fetch/request/stream/pipeline, dispatcher selection, timeouts, error handling, and links to the relevant api pages. lmk if the scope/direction looks right.
Activity
mcollina commentedon Aug 3, 2023
A massive overhaul of our docs is welcomed, but at this point it seems a stretch for the current team. I would love if somebody volunteered for this effort.
AliMahmoudDev commentedon Jun 6, 2026
One thing that helped me a lot when getting started with undici was the typed options in the source code itself — each class has JSDoc types that list all available options with defaults. For example,
new Pool(url, options)hasPoolOptionswhich documents every field.As a quick reference, the high-level mapping is:
fetch()wrapsClient.request(), options are mostly the same plus a few extrasrequest()/stream()are directDispatchermethodsPool/Agenthandle connection management withPoolOptionsandAgentOptionsconnectTimeout,headersTimeout,bodyTimeout,keepAliveTimeoutA getting started page that maps common use cases (basic fetch, streaming, custom dispatcher, mocking) to the relevant API surface would go a long way. Happy to draft something if there is interest.
mcollina commentedon Jun 6, 2026
Absolutely! Go for it!
AliMahmoudDev commentedon Jun 6, 2026
thanks, will start putting together a PR.
AliMahmoudDev commentedon Jun 6, 2026
opened a draft PR for a getting started guide -- #5371. covers fetch/request/stream/pipeline, dispatcher selection, timeouts, error handling, and links to the relevant api pages. lmk if the scope/direction looks right.