I'm trying to call my azure proxy function with query string parameters. I don't want to pass my params as route parameters, I want to do it with query string params as to not break my current contract.
My url is as follows https:/<mrUrl>.net/api/address-suggestions
I then have some static request overrides parameters that work fine.
Lastly I call the api as https:/<mrUrl>.net/api/address-suggestions?limit=10&query=main
In my proxies.json I have
"requestOverrides": {
"backend.request.method": "get",
"backend.request.querystring.api-version": "1.0",
"backend.request.querystring.countrySet": "US",
"backend.request.querystring.typeahead": "true",
"backend.request.querystring.query": "{query}",
"backend.request.querystring.limit": "{limit}"
}
That seems to be the only way to do what I want, but my response is always "query parameter is missing or empty" (note if I hard code the query in the JSON it works). Am I to assume there is no support for send query string params and only support for route params?
答案 0 :(得分:0)
I found it for anyone looking. Use request.querystring.<yourQuerystringName>