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

Axios Timeout does not work #17

Open
malishahi opened this issue Dec 1, 2022 · 0 comments
Open

Axios Timeout does not work #17

malishahi opened this issue Dec 1, 2022 · 0 comments

Comments

@malishahi
Copy link

I need to setup timeout for axios to fail for a problematic server, but the timeout does not work. Any idea what is the reason? The code is as the following: Thanks.

const httpsAgent = new https.Agent({
    // keepAlive: true,
    rejectUnauthorized: false,
    timeout: 15000,
    maxSockets: 100
});

const nconfig = {
    baseURL: endpoint,
    httpsAgent,
    agent: httpsAgent,
    withCredentials: true,
    shouldKeepAlive: true,
    keepAlive: true,
    keepAliveMsecs: 3000,
    maxRedirects: 0,
    timeout: 1000,
    responseType: 'json',
    Accept: "application/json;odata=verbose",
    headers: {
        Accept: "application/json;odata=verbose",
        "Content-Type": "application/json;odata=verbose",
    },
    'Access-Control-Allow-Origin': '*',
};

const axiosInstance = NtlmClient(credentials, nconfig);
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

1 participant