Skip to content

Allow adding a default response body encoding when extending ky #676

Open
@abubakriz

Description

@abubakriz

Example:

const api = ky.extend({
responseBodyEncoding: "json"
})

Now any time a request is made with ky, it will be as if you called .json() after it

api.get("example.com").json() -> api.get("example.com")

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions