Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator: simply overwrite axios baseurl #108

Open
maaaathis opened this issue May 31, 2024 · 0 comments
Open

Generator: simply overwrite axios baseurl #108

maaaathis opened this issue May 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@maaaathis
Copy link
Member

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" });
@maaaathis maaaathis added the enhancement New feature or request label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant