We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20e873b commit 52816ddCopy full SHA for 52816dd
backend/middleware/opera_log_middleware.py
@@ -138,7 +138,11 @@ async def get_request_args(request: Request) -> dict:
138
json_data = await request.json()
139
if isinstance(json_data, bytes):
140
json_data = json_data.decode('utf-8')
141
- args.update(json_data)
+ if isinstance(json_data, dict):
142
+ args.update(json_data)
143
+ else:
144
+ # 注意:非字典数据默认使用 body 作为键
145
+ args.update({'body': json_data})
146
else:
147
args.update({'body': str(body_data)})
148
return args
0 commit comments