我需要访问“Set-Cookie”值。 所以,我尝试这个
@activity('Set Cookie').output.ADFWebActivityResponseHeaders.Set-Cookie
)
错误显示为红色下划线,我不明白它是什么。 另外,在运行管道时,我收到错误
ErrorCode=InvalidTemplate, ErrorMessage=The expression 'activity('Set Cookie').output.ADFWebActivityResponseHeaders.Set-Cookie
)' is not valid: the string character 'C' at position '64' is not expected."
如果我这样做(在“Set-Cookie”之前停止,
@activity('Set Cookie').output.ADFWebActivityResponseHeaders
)
我获得完整的 ADFWebActivityResonseHeaders 作为字符串。 如何深入到单个元素?
我已经使用示例密钥尝试了您的方案,但遇到了相同的错误。
上述情况发生在触发的管道运行时。这是由于键值中的特殊字符造成的。如果您尝试仅调试管道,它将给出错误的请求错误,并且在触发级别它将给出上述错误。
要解决上述错误并指定具有特殊字符的键的值,您可以将键括在
[]
中,如下所示 ['<key_value>']
。
示例演示:
@activity('Web1').output.ADFWebActivityResponseHeaders['<key_name>']
结果: