Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@xsyx/easy-api-mp
Advanced tools
1. 在 modules 中配置接口基本信息 - url 接口地址 - method 请求方式 - 更多配置 ```javascript export default { // 一个简单的url 配置 'fetchSomeData': { // 完整的访问方法名 url: "/sample/data/normal", // 请
export default {
// 一个简单的url 配置
'fetchSomeData': {
// 完整的访问方法名
url: "/sample/data/normal", // 请求的地址(必填)
mockUrl: "/mock/data/normal", // mock 地址(可选项)
mockData: { rspCode: "success", data: [] }, // 静态 mock 数据
cached: "5000", // 表示接口在多久以内,缓存临时数据(可选项)
sensitive: "11", // 灵敏期,在这个时间段内,不会走缓存
method: "POST", // 请求方法 post get(可选项)
concurrency: false, // 是否允许并发(可选项)
mock: false, // 是否访问mock(可选项)
fit: (rsp, params) => {
// 拦截返回数据格式化
return rsp;
},
repeat: 3, // 重试次数
feed: (rsp, params)=>{ // 补偿机制,如果重试无效,则进入兜底返回
// 补偿机制
}
}
}
tips: 注册 toast / loading 插件
如果运行环境在 web 中, 则可以通过如下两个方法注册对应的插件,用以展示吐司消息和loading请求动画
FAQs
1. 在 modules 中配置接口基本信息 - url 接口地址 - method 请求方式 - 更多配置 ```javascript export default { // 一个简单的url 配置 'fetchSomeData': { // 完整的访问方法名 url: "/sample/data/normal", // 请
The npm package @xsyx/easy-api-mp receives a total of 2 weekly downloads. As such, @xsyx/easy-api-mp popularity was classified as not popular.
We found that @xsyx/easy-api-mp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.