Azure功能代理,can';我不能让它正常工作
我有两个函数,一个是Azure功能代理,can';我不能让它正常工作,azure,azure-functions,Azure,Azure Functions,我有两个函数,一个是Set和一个是Go,该函数将href作为查询字符串并返回一个代码(URL shortner)。Go函数获取代码并返回URL。到目前为止,我有: Http Functions: Api: [GET,POST,HEAD,PUT,DELETE,OPTIONS,PATCH,TRACE] http://localhost:7071/api/{*path} RedirectUrl: [GET] http://localhost:7071/{*shortUrl} Go: [GET,POS
Set
和一个是Go
,该函数将href作为查询字符串并返回一个代码(URL shortner)。Go函数获取代码并返回URL。到目前为止,我有:
Http Functions:
Api: [GET,POST,HEAD,PUT,DELETE,OPTIONS,PATCH,TRACE] http://localhost:7071/api/{*path}
RedirectUrl: [GET] http://localhost:7071/{*shortUrl}
Go: [GET,POST] http://localhost:7071/api/Go/{shortUrl}
Set: [GET,POST] http://localhost:7071/api/Set
使用以下proxies.json:
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"RedirectUrl": {
"matchCondition": {
"route": "/{*shortUrl}",
"methods": [
"GET"
]
},
"backendUri": "https://%WEBSITE_HOSTNAME%/api/Go/{shortUrl}"
},
"Api": {
"matchCondition": {
"route": "/api/{*path}"
},
"backendUri": "https://%WEBSITE_HOSTNAME%/api/{path}"
}
}
}
但我想解决的问题很少:
我希望能够做到:
http://localhost:7071/api/Go/{shortUrl}
但这会产生一个例外:Executed'Go'(失败,Id=f2786621-3486-432b-84c2-1a125b01d1d2)[11-07-2019 10:58:14]System.Private.CoreLib:执行函数:Go时出现异常。Microsoft.Azure.WebJobs.Host:异常绑定参数“shortUrl”。Microsoft.Azure.WebJobs.Host:绑定数据不包含预期值“shortUrl”。
我不知道为什么