# cross-get-api

> 封装了JsonBird的接口，方便访问一些本身需要跨域的接口

Latest version **1.0.1** (published 2018-07-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install cross-get-api
pnpm add cross-get-api
yarn add cross-get-api
bun add cross-get-api
```

## 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.1 |
| Published | 2018-07-13 |
| First published | 2018-07-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | slash_chu |
| Maintainers | slash_chu |

## Links

- npm: https://www.npmjs.com/package/cross-get-api
- npm.io page: https://npm.io/package/cross-get-api

## Recent versions

- 1.0.1 (latest) — 2018-07-13
- 1.0.0 — 2018-07-13

## README

#### 简介

封装了 [JsonBird](https://bird.ioliu.cn/) 提供的接口， 可以解决一些公共 Api 访问跨域的问题。
依赖 `axios` 写的，所以需要先安装 axios 
#### 安装

```
npm install npm-bird-api axios qs -S
```

#### 使用

```
import { getData } from 'npm-bird-api'

let url = 'xxxx' // 你要访问的接口地址
let methods = 'GET' // 默认是get，暂未支持POST
let data = 'xxx' // 传入的data值

getData({url, methods, data}).then(res => {
    // 访问成功后的数据
    console.log(res)
}).catch(err => {
    console.log(err)
})
```

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