Skip to content

Accept Axios options #76

@dguo

Description

@dguo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions