Skip to content

Add a tracing custom fetch example #4

Description

@TDanks2000

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationexamples

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions