fix: use input_data form field for SD API in instruct
This commit is contained in:
@@ -172,7 +172,7 @@ async def _send_sd_api_request(requester_email: str, subject: str, description:
|
|||||||
headers = {"authtoken": SD_TOKEN, "Accept": "application/vnd.manageengine.sdp.v3+json"}
|
headers = {"authtoken": SD_TOKEN, "Accept": "application/vnd.manageengine.sdp.v3+json"}
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=False) as client:
|
async with httpx.AsyncClient(verify=False) as client:
|
||||||
response = await client.post(url, headers=headers, json=payload, timeout=15.0)
|
response = await client.post(url, headers=headers, data={"input_data": json.dumps(payload)}, timeout=15.0)
|
||||||
|
|
||||||
if response.status_code in (200, 201):
|
if response.status_code in (200, 201):
|
||||||
res_json = response.json()
|
res_json = response.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user