Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different Routes in Azure Functions


I am using Azure Functions and I want to create a Function that should react to multiple routes. For example "/path1/{param1}" and "/path2/xxx/{param2}" or something like this.
Does anybody know how can I implement this?

like image 932
Flash91 Avatar asked Jan 03 '23 16:01

Flash91


2 Answers

You should use Function Proxies for that.

like image 183
Mikhail Shilkov Avatar answered Jan 15 '23 23:01

Mikhail Shilkov


Azure Functions only allow you to map a single route to a function. However the route can contain a regex. It would give you a little flexibility. You can find more information on it here.

Easier and more flexible way to do it would through be Function Proxies.

like image 45
Naren Avatar answered Jan 16 '23 01:01

Naren