Skip to content

Change defaults in fetch options #2159

Open
@boompikachu

Description

@boompikachu

Description

Is there a way to change the default value when creating fetch client especially the baseUrl?
const client = createFetchClient({ baseUrl: 'some-url' })

for example, in axios, we can just do axiosInstance.defaults.baseURL = 'new-base-url'

Proposal

maybe

const client = createFetchClient({ baseUrl: 'some-url' })
client.defaults.baseUrl = "new-base-url"

Extra

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestopenapi-fetchRelevant to the openapi-fetch library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions