diff --git a/servc/svc/com/http/__init__.py b/servc/svc/com/http/__init__.py index 95b9aee..917f9a4 100644 --- a/servc/svc/com/http/__init__.py +++ b/servc/svc/com/http/__init__.py @@ -116,7 +116,9 @@ def _health(self): def _getResponse(self, id: str): return jsonify(self._cache.getKey(id)) - def _postMessage(self): + def _postMessage(self, extra_params: Dict | None = None): + if not extra_params: + extra_params = {} content_type = request.headers.get("Content-Type", None) if request.method == "GET": return self._getInformation() @@ -154,6 +156,11 @@ def _postMessage(self): "id": body["id"] if "id" in body else "", "argument": body["argument"], } + if isinstance(body["argument"], dict): + payload["argument"] = { + **payload["argument"], + **extra_params, + } if "instanceId" in body: payload["instanceId"] = body["instanceId"] force: bool = True if "force" in body and body["force"] else False