我正在尝试将标头添加到Logic App中的Http Swagger操作中.
当我添加一个简单的Http Action时,我可以清楚地看到设计器中的Headers.
然而,随着Swagger Http动作,它消失了.
我正在使用基于令牌的身份验证,需要将Header添加到此API调用.
因此,我修改了下面的代码视图,但它似乎没有帮助!
找不到与此有关的资源.任何帮助表示赞赏.
谢谢.
"Information_Process": {
"inputs": {
"body": {
"fileId": "Test.json",
"items": [
{
"item": {
"prop1": "@items('For_each')?['Item']?['prop1']",
"prop2": "@items('For_each')?['Item']?['prop2']",
"prop3": "@items('For_each')?['Item']?['prop3']"
}
}
]
},
"headers": {
"Authorization": "@{concat('Bearer ',variables('BearerTokenValue'))}"
},
"method": "post",
"uri": "https://appone.azurewebsites.net/api/information/proccessing"
},
"metadata": {
"apiDefinitionUrl": "https://appone.azurewebsites.net//swagger/docs/v1",
"swaggerSource": "custom"
},
"type": "Http"
}
最佳答案 官方
documentation声明使用参数来发送和接收令牌.
"parameters": {
"secret": {
"type": "SecureString"
}
}
或者你可以尝试这样
"HTTP": {
"inputs": {
"headers': {
"Authorization": "@concat('Basic ', base64('username:password'))",
"Content-Type ": "application/json"
},
"method ": "GET ",
"uri": "someurl"
},
"runAfter": (),
"type": "Http"
}