123456789101112131415161718192021222324 |
- """
- @author: luojunhui
- """
- import requests
- NEW_IP = "192.168.0.142"
- NEW_PORT = "8111"
- async def forward_requests(params, api):
- """
- 转发请求
- :return:
- """
- new_url = "http://{}:{}/{}".format(NEW_IP, NEW_PORT, api)
- response = requests.post(
- url=new_url,
- headers={
- "Content-Type": "application/json",
- },
- json=params
- )
- return response.json()
|