Socket
Socket
Sign inDemoInstall

jzy-request-client

Package Overview
Dependencies
20
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jzy-request-client

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


Version published
Weekly downloads
14
decreased by-33.33%
Maintainers
1
Install size
2.18 MB
Created
Weekly downloads
 

Readme

Source

配置

标准配置项:

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

扩展配置项:

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

## 标准Restful 支持

Get

参数:

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

Roadmap

1. 支持请求重试;

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

2. 预设拦截器

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

3. 支持实例化配置;

4. 代理检测

    禁用系统代理

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 实现) 封装常用请求;

Keywords

FAQs

Last updated on 20 May 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc