Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion servc/svc/com/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down