From 55d146bcdc9e01f3f888984a59bb51f27abb4199 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Wed, 24 Jan 2024 15:49:39 +0800 Subject: [PATCH] update --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 016d427..a3c4005 100644 --- a/main.py +++ b/main.py @@ -113,8 +113,12 @@ async def register(request: Request): @app.post("/api/xumu/data/collect") async def process_data(request: Request): # TODO mqtt检测 - r = await request.body() - print(r) + data = await request.body() + data = data.decode("utf-8") + data = json.loads(data) + print(data) + + return 200 # try: # data = await request.body()