fix(plugin): setting the default value of the agent tool does not take effect (#341)

This commit is contained in:
mrh997
2025-07-30 22:51:16 +08:00
committed by GitHub
parent 357da72a52
commit 9660a85454
7 changed files with 115 additions and 46 deletions

View File

@@ -596,7 +596,7 @@ func genRequestString(req *http.Request, body []byte) (string, error) {
return "", fmt.Errorf("[genRequestString] marshal failed, err=%s", err)
}
if body != nil {
if len(body) > 0 {
requestStr, err = sjson.SetRaw(requestStr, "body", string(body))
if err != nil {
return "", fmt.Errorf("[genRequestString] set body failed, err=%s", err)