
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@heisea/fetch
Advanced tools
Using yarn
yarn add @heisea/fetch
import { initFetch, plus } from '@heisea/fetch';
// 创建createFetch函数,参数为axios的配置,具体请参考axios。其中errTipFn为错误提示语的调用函数
// 在response.code为非0的情况下库会调用errTipFn方法,这里的Message.error则为elementui的风格,
// 可以根据ui框架定义不同的风格
const createFetch = initFetch({
baseURL: Config.baseUrl,
errTipFn: Message.error
});
// plus为针对全量定制的http header的中间件,如果不在全量版使用无需引入plus
/**
* Config为全量版的配置文件
* MODE为全量版环境变量即process.env.MODE的值
* portalMessageSend用于在一包中同基座进行通信的库
*/
const fetch = createFetch([
plus(Config, MODE, portalMessageSend),
]);
export default fetch;
FAQs
公共fetch请求库
We found that @heisea/fetch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.