Skip to content

Making requests with timeout  #10

Open
@johtso

Description

@johtso

Specifying a timeout when making a web request seems like a core feature, otherwise your code is at the whim of whatever you're communicating with.

Usually I'd pass a AbortSignal.timeout(time) in the fetch options.

Another solution would be to race the promise with setTimeout. Doesn't look like the promises package exposed race functionality though.

Possibly linked with #4.. depending on the approach

Related:
gleam-lang/javascript#11
gleam-lang/javascript#10

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