npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jzy-request-client

v1.0.5

Published

基于web fetch api封装的http 网络请求库

Downloads

92

Readme

配置

标准配置项:

  • 默认禁用缓存;
  • 默认禁用cookie;
  • 默认允许重定向请求;
  • 默认referrer 为完整的页面 url 地址;

扩展配置项:

  • 请求间隔时间,默认0ms;
  • 重试机制,默认不开启(如果开启重试机制,则请求以最后一次请求时间为准);
  • 撤销请求

## 标准Restful 支持

Get

参数:

| 参数 | 说明 | | | :-------------: | :------: | :--: | | url | 请求地址 | | | requestData | | | | headerOptions | | | | requestOptions | | | | abortController | | |

Roadmap

1. 支持请求重试;

    全局配置重试次数;
    单个接口配置;

2. 预设拦截器

    日志拦截器;
    请求拦截器和响应拦截器支持同步/异步处理;

3. 支持实例化配置;

4. 代理检测

    禁用系统代理

5. cookie 自动管理

6. 支持RxJs

    RxJs 版超时机制;
    RxJs 版节流;
    RxJx 重试机制;

6. 支持合并请求

7.旧版本浏览器不受支持的API

URLSearchParams https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams

Fetch

Promise

AbortController

1.01

更改打包配置

1.00

正式支持超时配置、请求重试等重要功能

#0.0.5 添加请求防重机制

#0.0.3

    1.更正请求参数设置错误;
    备注: 暂无足够资源测试接口逻辑是否完善,仅仅测试了 get 、

0.0.2

    1. 预定义状态码
    2. web fetch API 
    3. 支持标准HTTP 请求方法;
    4. 支持超时机制(Promise.race()实现);
    5. 默认禁用cookie;
    

0.0.1

    基于axios(XMLHTTPRequest 实现) 封装常用请求;