Installations
npm install axios-extra
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
12.22.12
NPM Version
6.14.16
Score
52.3
Supply Chain
76.8
Quality
74.6
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
cnwhy
Download Statistics
Total Downloads
9,198
Last Day
6
Last Week
23
Last Month
151
Last Year
2,453
GitHub Statistics
8 Stars
14 Commits
3 Forks
3 Watching
1 Branches
1 Contributors
Bundle Size
9.67 kB
Minified
3.38 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.0.8
Package Id
axios-extra@0.0.8
Unpacked Size
12.36 kB
Size
4.79 kB
File Count
11
NPM Version
6.14.16
Node Version
12.22.12
Publised On
11 Oct 2023
Total Downloads
Cumulative downloads
Total Downloads
9,198
Last day
100%
6
Compared to previous day
Last week
35.3%
23
Compared to previous week
Last month
28%
151
Compared to previous month
Last year
-12%
2,453
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
axios-extra
通过 ES6 的Proxy
对像, 让 axios 集成 promise-queue-plus, 使 axios
支持 最大并发 及 出错重试 的功能.
未添加任何 API, 你完全可以像使用
axios
那样使用axios-extra
; 由于使用了Proxy
,请注意兼性.
API
axios.create(config)
现在可以通过设置 maxConcurrent
和 queueOptions
属性, 设置最大并发及重试次数.
1// axios 并发为10, 自动重试为0 2const axios = require('axios-extra'); //默认最大并发 10, 重试 0; 3 4// 创建一个 并发为1, 自动重试为3的 axios; 5let axios1 = axios.create({ 6 maxConcurrent:1, //并发为1 7 queueOptions: { 8 retry:3, //请求失败时,最多会重试3次 9 retryIsJump: true //是否立即重试, 否则将在请求队列尾部插入重试请求 10 } 11}); 12 13let {stop, start, clear} = axios1.requestQueue; // 暴露内部的队列对像,可以使用 stop start clear 等 API;
更多
queueOptions
配制可参看这里
axios(config) 及 get|post|request|delete|head|options|put|patch
config
参数可以为某一次的请求设置 queueOptions
;
1axios.get('https://www.google.com',{ 2 queueOptions : { 3 retry: 5 4 } 5});
create(axios,maxConcurrent,queueOptions)
扩展现有 axios
扩展项目中现有 axios
,保证 axios
版本.
1const aec = require('axios-extra/create'); 2const axios = aec(requeir('axios'), 5, { retry: 5 });
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Info: no jobLevel write permissions found
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/cnwhy/axios-extra/test.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/cnwhy/axios-extra/test.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/cnwhy/axios-extra/test.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/test.yml:30
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
Found 0/14 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3.4
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More