diff --git a/bkflow/pipeline_plugins/components/collections/http/v1_0.py b/bkflow/pipeline_plugins/components/collections/http/v1_0.py index be15c56..c36aa98 100644 --- a/bkflow/pipeline_plugins/components/collections/http/v1_0.py +++ b/bkflow/pipeline_plugins/components/collections/http/v1_0.py @@ -21,6 +21,7 @@ from __future__ import absolute_import +import json import traceback from copy import deepcopy @@ -133,6 +134,8 @@ def plugin_schedule(self, data, parent_data, callback_data=None): other = {"headers": {}, "timeout": timeout} if method.upper() not in ["GET", "HEAD"]: + if not isinstance(body, str): + body = json.dumps(body) other["data"] = body.encode("utf-8") other["headers"] = {"Content-type": "application/json"}