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

Accept Axios options #76

Open
dguo opened this issue Dec 29, 2020 · 1 comment
Open

Accept Axios options #76

dguo opened this issue Dec 29, 2020 · 1 comment

Comments

@dguo
Copy link

dguo commented Dec 29, 2020

It would be helpful if the client could take an optional parameter for Axios options to pass to the actual Axios calls.

Recently, we have been getting a lot of ETIMEDOUT errors. Based on this StackOverflow answer, we added this:

axios.defaults.timeout = 30000;
axios.defaults.httpsAgent = new https.Agent({ keepAlive: true });

However, this applies to other places where we use Axios, since we're setting them globally. We can't selectively apply it only to the Synapse calls, and it's causing us issues. It would be great if we could pass in the options to the client constructor instead.

@jenstroeger
Copy link
Contributor

jenstroeger commented Jan 14, 2021

I added options to the request itself. See #78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants