fix: use params instead of content for SD API requests
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user