Skip to content

Add support for request timeout in HTTP transport #564

@gnarea

Description

@gnarea

I'd be happy to propose a PR, but I'd recommend rewriting the transport with fetch instead of extending the current approach:

const req = base.request(url, opts, (res: Socket) => {

... As I'd have to use setTimeout(), which would make the code more complicated.

The drawback of fetch() is that it'd require Node.js 18+. Which shouldn't be too bad as Node.js 16 is reaching EOL in a few weeks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions