Skip to content

Give back statusText from request(), not just dispatch() #4783

@domenic

Description

@domenic

This would solve...

This would allow jsdom to simplify some of its high-level request handling, so that most of the codebase can use request() instead of dispatch().

In particular, this code could be simplified, removing all the work of translating between AbortSignals and undici controllers.

The implementation should look like...

Extend ResponseData with statusText instead of dropping the status text on the floor.

I have also considered...

I admit this is a niche feature, and that people should generally not care about status text. But, jsdom needs to pass the relevant web platform tests, and would really appreciate it.

Additional context

#4782

I'll try to send a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions