Skip to content

Generator: simply overwrite axios baseurl #108

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" });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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