Update fun.py
Browse files
fun.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
from fastapi import FastAPI, Request, Response, status
|
2 |
import httpx
|
3 |
import uvicorn
|
4 |
-
|
5 |
app = FastAPI()
|
|
|
6 |
TARGET_BASE = "http://127.0.0.1:8001" # 替换为你的目标服务器
|
7 |
resp = httpx.get(TARGET_BASE)
|
8 |
print(f'RESP:{ resp.json}')
|
|
|
1 |
from fastapi import FastAPI, Request, Response, status
|
2 |
import httpx
|
3 |
import uvicorn
|
4 |
+
import time
|
5 |
app = FastAPI()
|
6 |
+
time.sleep(10)
|
7 |
TARGET_BASE = "http://127.0.0.1:8001" # 替换为你的目标服务器
|
8 |
resp = httpx.get(TARGET_BASE)
|
9 |
print(f'RESP:{ resp.json}')
|