fix: use params instead of content for SD API requests

This commit is contained in:
Денис Кривоченко
2026-07-15 22:28:15 +07:00
parent e2c0a2572d
commit 4df52d48f5
+1 -1
View File
@@ -178,7 +178,7 @@ async def create_ticket_in_sd(requester_email: str, subject: str, description: s
if template_id: if template_id:
req_payload["request"]["request_template"] = {"id": template_id} req_payload["request"]["request_template"] = {"id": template_id}
async with httpx.AsyncClient(verify=False) as client: async with httpx.AsyncClient(verify=False) as client:
resp = await client.post(endpoint, headers=headers, content=json.dumps({"input_data": req_payload}), timeout=15.0) resp = await client.post(endpoint, headers=headers, params={"input_data": json.dumps(req_payload)}, timeout=15.0)
if resp.status_code not in [200, 201]: if resp.status_code not in [200, 201]:
sd_workflow_logger.error(f"API Error: status={resp.status_code} body={resp.text}") sd_workflow_logger.error(f"API Error: status={resp.status_code} body={resp.text}")
return resp return resp