You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from fastapi import FastAPI
import json
app = FastAPI()
@app.post("/observer")
async def receive_data(data: dict):
# Append the data to a file with newline for each item
with open("data.json", "a") as f:
for event in data["events"]:
json.dump(event, f)
f.write("\n")
# Return a success message
return {"message": "Data received and appended successfully"}
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
测试单独 curl post 请求正常。
配置后中转代理使用正常,但是 插件服务不能收到任何数据。
请问插件是需要单独部署吗?
The text was updated successfully, but these errors were encountered:
按照文档配置 支持使用插件获取统计数据:
已经 开发 http://3.3.3.3:8000/observer 的接口服务
测试单独 curl post 请求正常。
配置后中转代理使用正常,但是 插件服务不能收到任何数据。
请问插件是需要单独部署吗?
The text was updated successfully, but these errors were encountered: