# video-request

> ```javascript import VideoRequest from "@video/request/lib/index";

Latest version **1.2.2** (published 2022-04-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install video-request
pnpm add video-request
yarn add video-request
bun add video-request
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2022-04-26 |
| First published | 2022-04-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 18 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | muzqi |
| Maintainers | muzqi |

## Links

- npm: https://www.npmjs.com/package/video-request
- npm.io page: https://npm.io/package/video-request

## Dependencies (5)

- [md5](https://npm.io/package/md5.md) ^2.3.0
- [core-js](https://npm.io/package/core-js.md) ^3.22.2
- [@types/md5](https://npm.io/package/@types/md5.md) ^2.3.2
- [whatwg-fetch](https://npm.io/package/whatwg-fetch.md) ^3.6.2
- [@babel/runtime-corejs3](https://npm.io/package/@babel/runtime-corejs3.md) ^7.17.9

## Recent versions

- 1.2.2 (latest) — 2022-04-26
- 1.2.1 — 2022-04-26

## README

## 示例

```javascript
import VideoRequest from "@video/request/lib/index";

const request = new VideoRequest({
  prefixUrl: "/frdo-fe-bff/api",
  signature: {
    appid: "appid",
    appName: "web",
    appVersion: "1.0.0",
    privateKey: `aassd${window.btoa("private key content")}`,
  },
});

request.post({
  url: "/example",
  dataMaskKeys: `12345${window.btoa("phone")}`,
  parameters: {
    phone: `12345${window.btoa("17783701658")}`,
  },
});
```

## 更新日志

### v1.0.0

- 初次发布，提供前端 BFF 层鉴权请求体

### v1.0.2

- 解决 jsrsasign 和 @cmiot/checker 模块类型错误

### v1.0.3

- 解决 md5 模块类型错误

### v1.1.0

- 优化 RSA 算法性能

### v1.1.1

- 删除调试用的 console

### v1.2.0

- 更换签名算法 rsa->md5
- 修复 headers.phoneName 字段可能不存在的问题
- 编译加入 @babel/preset-env

### v1.2.1

- 添加 whatwg-fetch

---
_Source: https://npm.io/package/video-request · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
