Background:
The docs show how to pass a custom fetch. A tracing example would help users
wrap request execution for simple logging or instrumentation while still using
the default transport.
Proposed change:
Add an example that defines a FetchLike, records method and URL, then delegates
to the runtime fetch.
Acceptance criteria:
- The example imports
FetchLike.
- The example delegates to
fetch(input, init).
- The example does not depend on a specific logging library.
- The example explains that full execution control should use
Transport
instead.
Files likely involved:
docs/examples.md
docs/guides/rest-requests.md
src/transport/types.ts for source reference only
Background:
The docs show how to pass a custom
fetch. A tracing example would help userswrap request execution for simple logging or instrumentation while still using
the default transport.
Proposed change:
Add an example that defines a
FetchLike, records method and URL, then delegatesto the runtime
fetch.Acceptance criteria:
FetchLike.fetch(input, init).Transportinstead.
Files likely involved:
docs/examples.mddocs/guides/rest-requests.mdsrc/transport/types.tsfor source reference only