【发布时间】:2021-10-22 09:35:05
【问题描述】:
我有 Argo 工作流程
script:
image: curlimages/curl:latest
command:
- sh
source: >
http_response=$(curl -X DELETE -w "%{http_code}" -o /mnt/out/rest_output.txt https://myurl/{{workflow.parameters.id}} -H "Authorization:Bearer {{inputs.parameters.token}}")
echo $http_response > /mnt/out/http_response.txt
volumeMounts:
- name: out
mountPath: /mnt/out
volumes:
- name: out
emptyDir: { }
调用 REST 服务。 问题是即使服务在 curlimage 中返回 400,http_response 也会返回空字符串。 可能是什么问题? 提前致谢。
【问题讨论】:
标签: curl http-headers argo-workflows