mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
fix: test custom tool already exists without decrypting credentials (#2668)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user