Skip to content

Unable to increase timeout #108

@benrobot

Description

@benrobot

Question

How can I increase the timeout to allow slow running HTTP requests to complete?

Problem

My call to

web3Data.address.getBalance(walletAddress, { includeTokens: true, includePrice: true, currency: "usd" });

times out often but I can't find a way to increase the time.

Already Tried

I tried setting the axios default timeout to 600000 (10 minutes) but the timeout remained around 30 seconds

axios.defaults.timeout = 600000;
web3Data.address.getBalance(walletAddress, { includeTokens: true, includePrice: true, currency: "usd" });

Suggestion

It looks like axios is being used but there's no way to include override the axios configuration. Is there a way to override the axios configuration? Maybe something like

const options = { axiosRequestConfig: { timeout: 600000 } };
const web3Data = new Web3Data(apiKey, options);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions