Skip to content

Commit

Permalink
update docs for adding proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
twesix committed Jan 4, 2018
1 parent b10d748 commit ca739bd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@


## 版本新特性

### ? ? ? | 2018.01.04
添加了proxy功能

### 2.8.0 | 2018.01.04
用 'request' 重写了请求函数

Expand Down
20 changes: 20 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,27 @@
## 工作原理
跨站请求伪造 (CSRF), 伪造请求头,调用官方 API

## 可以使用代理
在query参数中加上proxy=your-proxy即可让这一次的请求使用proxy

```javascript
// 例子
const url = `http://localhost:3000/music/url?id=33894312&proxy=http://121.196.226.246:84`
fetch(url)
.then(function()
{
// do what you want
})

// 结果
// {"data":[{"id":33894312,"url":"http://m10.music.126.net/20180104125640/930a968b3fb04908b733506b3833e60b/ymusic/0fd6/4f65/43ed/a8772889f38dfcb91c04da915b301617.mp3","br":320000,"size":10691439,"md5":"a8772889f38dfcb91c04da915b301617","code":200,"expi":1200,"type":"mp3","gain":-2.0E-4,"fee":0,"uf":null,"payed":0,"flag":0,"canExtend":false}],"code": 200}
```

## 版本新特性

### ? ? ? | 2018.01.04
添加了proxy功能

### 2.8.0 | 2018.01.04
用 'request' 重写了请求函数

Expand Down

0 comments on commit ca739bd

Please sign in to comment.