Skip to content

Support passing AbortSignal / signal to SDK requests #158

@bradvogel

Description

@bradvogel

Hi, it would be useful if the SDK supported passing an AbortSignal through request options so in-flight calls can be cancelled.

Right now I don't see a way to provide a signal when using the SDK methods. Adding support for this would help with things like:
• cancelling stale requests in UIs
• enforcing timeouts with AbortController
• avoiding wasted work when a user navigates away or changes input

A simple version would be allowing a signal?: AbortSignal option on the client methods and forwarding it to the underlying fetch call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions