Skip to content

Generator: simply overwrite axios baseurl #108

@maaaathis

Description

@maaaathis

The axios baseURL is the target of any api request. To set it you currently have to do something like this:

const client = new ShareSecretApiClient();
client.axios.defaults.baseURL = "https://api.domain.tld";

Thats not simple or even intuitive.

Proposed Solution

To make this more user-friendly, we could introduce an option to set the baseURL directly in the ApiClient constructor. This way, users can easily configure the baseURL when creating an instance of the client. Here's an example of how this might look:

const client = new ShareSecretApiClient({ baseURL: "https://api.domain.tld" });

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