-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinterface.js
56 lines (56 loc) · 1.17 KB
/
interface.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
module.exports = {
project: "Interface-proxy",
version: "1.0.0",
servers: [{
id: "baidu",
name: "baidu",
timeOut: 2000,
protocol: 'http:',
hostname: "www.baidu.com",
port: 80
},
{
id: "zhihu",
name: "知乎",
timeOut: 5000,
hostname: "news-at.zhihu.com",
port: 80
}
],
interfaces: [{
id: "getBaiduHTML",
name: "获取baidu首页html文档",
path: "/",
serverId: "baidu",
method: "GET",
headers: {
"Content-Type": "text/html;charset=utf-8"
}
},
{
id: "getZhiHuData",
name: "获取知乎日报最新消息",
path: "/api/4/news/latest",
serverId: "zhihu",
method: "GET",
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
},
param: {},
timeOut: 6000
},
{
id: "getZhiHuContent",
name: "获取知乎日报最新消息详情",
path: "/api/4/news/",
serverId: "zhihu",
method: "GET",
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
},
param: {
id: ""
}
}
]
};