# app-url-request

> 封装了原生app与服务器通信的方式

Latest version **1.0.9** (published 2020-10-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install app-url-request
pnpm add app-url-request
yarn add app-url-request
bun add app-url-request
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2020-10-23 |
| First published | 2020-10-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 56 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | langfutao |
| Maintainers | hundushang |
| Keywords | app-url-request, up360, url, request |

## Links

- npm: https://www.npmjs.com/package/app-url-request
- Repository: git@git.up360.com:UP360_FRONT_END_COMMON/app-url-request
- npm.io page: https://npm.io/package/app-url-request

## Dependencies (3)

- [qs](https://npm.io/package/qs.md) ^6.6.0
- [md5](https://npm.io/package/md5.md) ^2.2.1
- [up360-js-native](https://npm.io/package/up360-js-native.md) ^1.2.13

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.9 (latest) — 2020-10-23

## README

# 封装了原生 app 与服务器通信的方式

使用方式：
<br>
`npm install app-url-request`

```js
//引入
import AppUrlRequest from 'app-url-request'

// 设置请求的base url
AppUrlRequest.setBaseUrl(baseUrl)

// 设置imei，如果不设置会尝试从向上网app中获取
AppUrlRequest.setIMEI('xxx')

// 设置用户id，如果不设置会尝试从向上网app中获取
AppUrlRequest.setUserId(123)

let url = '/test-url'
let params = { name: 'test' }
// 发送get请求
AppUrlRequest.get(url, params).then(res => {
  console.log(res.data)
})
// 发送get请求
AppUrlRequest.post(url, params).then(res => {
  console.log(res.data)
})
```

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