fix: http raw response undefined (#2981)

This commit is contained in:
heheer
2024-10-25 11:53:32 +08:00
committed by GitHub
parent 75494f8d01
commit 165fe077bc
2 changed files with 11 additions and 6 deletions

View File

@@ -232,10 +232,15 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
// format output value type
const results: Record<string, any> = {};
node.outputs.forEach((item) => {
const key = item.key.startsWith('$') ? item.key : `$.${item.key}`;
results[item.key] = JSONPath({ path: key, json: formatResponse })[0];
});
node.outputs
.filter(
(item) =>
item.key !== NodeOutputKeyEnum.error && item.key !== NodeOutputKeyEnum.httpRawResponse
)
.forEach((item) => {
const key = item.key.startsWith('$') ? item.key : `$.${item.key}`;
results[item.key] = JSONPath({ path: key, json: formatResponse })[0];
});
if (typeof formatResponse[NodeOutputKeyEnum.answerText] === 'string') {
workflowStreamResponse?.({