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" });
The axios baseURL is the target of any api request. To set it you currently have to do something like this:
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: