fix: test custom tool already exists without decrypting credentials (#2668)
This commit is contained in:
parent
34387ec0f1
commit
36686d7425
4 changed files with 41 additions and 12 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
from json import dumps
|
||||
from typing import Any, Union
|
||||
from urllib.parse import urlencode
|
||||
|
||||
import httpx
|
||||
import requests
|
||||
|
|
@ -203,6 +204,8 @@ class ApiTool(Tool):
|
|||
if 'Content-Type' in headers:
|
||||
if headers['Content-Type'] == 'application/json':
|
||||
body = dumps(body)
|
||||
elif headers['Content-Type'] == 'application/x-www-form-urlencoded':
|
||||
body = urlencode(body)
|
||||
else:
|
||||
body = body
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue