我正在尝试访问Http Header param'授权'作为骡子表达的一部分。我正在尝试检查Authorization参数是否已作为标题的一部分传递。
以下是我尝试使用的代码
message.inboundProperties.'http.headers'[authorization] == null
我收到以下错误。
执行表达式 " message.inboundProperties。' http.headers' [授权] == null" 失败。 (org.mule.api.expression.ExpressionRuntimeException)。
注意:我在创建新的简单自定义策略时尝试在查询部分中使用上述表达式
答案 0 :(得分:1)
用作[message.inboundProperties.authorization == null]
。
希望这有帮助。
答案 1 :(得分:0)
如果您要验证
> <http:basic-security-filter securityProviders="memory-provider" realm="Valid > user credentials must be provided"></http:basic-security-filter>
如果您只是想检查值#[inboundProperties.authorization == null]