Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

prefixUrl is ignored causing URL building to fail #369

@Mnkras

Description

@Mnkras

In fetch.ts there is this code:
const url = new URL(typeof input === 'string' ? input : input.url); that assumes that the input will always be a full URL or object with a full URL.
That is an incorrect assumption and breaks got clients using prefixUrl since input is just a path (/something)

It seems all this logic is to merge query params which references this got bug: sindresorhus/got#1188
Since it is now resolved, do we still need this code?

Can we remove this extra parsing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions