Skip to content

Add an init hook #431

@purepear

Description

@purepear

Having a way to alter the options before initialising the request would be helpful. Currently there's no easy way to alter the searchParams or urlPrefix in a hook. For example, sanitisation/modification of searchParams is only possible through the beforeRequest hook by "deconstructing" and then constructing and returning a new request AFAIK. I think sth like the init hook of got will be useful in these(and other) situations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions