New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

smartlitefetch

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartlitefetch

A powerful HTTP request library with advanced features: caching, mocking, debugging, middleware, and support for both node-fetch 2.x and 3.x

latest
Source
npmnpm
Version
2.1.34
Version published
Maintainers
1
Created
Source

smartLiteFetch

npm version Downloads

一个轻量级的 Node.js HTTP 客户端,基于 node-fetch,支持 v2 (CommonJS) 和 v3 (ESM) 版本。

安装

npm install smartlitefetch --save

快速开始

// V3 (ESM)
import { get, post } from 'smartlitefetch';

// GET 请求
await get('https://api.example.com/users');

// POST 请求
await post('https://api.example.com/users', { body: { name: 'John' } });

支持功能:拦截器、重试、超时、缓存、端口检查、FormData 等。

详细文档和示例请查看 GitHub 仓库

API

创建实例:

import { create } from 'smartlitefetch';
const api = create({ baseURL: 'https://api.example.com' });

更多配置见 GitHub 文档。

要求

  • Node.js >= 10.0.0 (v2) 或 >= 12.20.0 (v3)

贡献

欢迎 PR!详情见 GitHub。

Keywords

fetch

FAQs

Package last updated on 23 Jul 2025

Did you know?

Socket

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.

Install

Related posts