File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ proxy_py has server based on aiohttp which is listening 127.0.0.1:55555(you can
35
35
36
36
``` json
37
37
{
38
- ' model': ' proxy' ,
39
- ' method': ' get' ,
40
- ' order_by': ' response_time, uptime'
38
+ " model" : " proxy" ,
39
+ " method" : " get" ,
40
+ " order_by" : " response_time, uptime"
41
41
}
42
42
```
43
43
@@ -48,10 +48,10 @@ It will return json response like this:
48
48
49
49
``` json
50
50
{
51
- ' status': 'ok' ,
52
- ' count' : 1,
53
- ' has_more' : True,
54
- ' data' : [{
51
+ " status" : " ok " ,
52
+ " count" : 1 ,
53
+ " has_more" : True,
54
+ " data" : [{
55
55
"address" : " http://127.0.0.1:8080" ,
56
56
"auth_data" : null ,
57
57
"bad_proxy" : false ,
@@ -72,8 +72,8 @@ Or error if something went wrong:
72
72
73
73
``` json
74
74
{
75
- ' status': ' error' ,
76
- ' error_message': ' You should specify model' ,
75
+ " status" : " error" ,
76
+ " error_message" : " You should specify model" ,
77
77
}
78
78
```
79
79
@@ -95,8 +95,8 @@ import json
95
95
def get_proxies ():
96
96
result = []
97
97
json_data = {
98
- ' model' : ' proxy' ,
99
- ' method' : ' get' ,
98
+ " model" : " proxy" ,
99
+ " method" : " get" ,
100
100
}
101
101
102
102
response = json.loads(requests.post(' http://example.com:55555' , json = json_data).text)
@@ -115,8 +115,8 @@ import aiohttp
115
115
async def get_proxies ():
116
116
result = []
117
117
json_data = {
118
- ' model' : ' proxy' ,
119
- ' method' : ' get' ,
118
+ " model" : " proxy" ,
119
+ " method" : " get" ,
120
120
}
121
121
122
122
with aiohttp.ClientSession() as session:
You can’t perform that action at this time.
0 commit comments