Routing to an Azure Function confusion

Using web.post on the notecard.
myreq = {‘req’:‘web.post’}
myreq[‘route’]=route_alias
myreq[‘body’]=message
What works:

  • Defined a Notehub.io route as “Proxy for Web Device Web Request”, set the fields “Route Name” and “Route Alias” to “postfile”. Set the variable “route_alias” above to “postfile”. It all works and has worked for a long time.

What does not work:

  • Define a route as an “Azure Function”. Set the “Route Name” to “postfileaz”. There is no “Route Alias” field. Set the same variable above to “postfileaz”. Error:

card.Transaction rsp {‘err’: “hub request error: notehub route with alias ‘postfileaz’ cannot be found”}

Sounds like I am missing something fundamental here!

Hi @Francois,

The web.* APIs only allow you to route data through the “Proxy for Web…” route type in Notehub. So the first scenario you describe is the approved way of routing data.

The “Azure Function” route type would be used for the more typical routing of notes found in our routing tutorials.

Thanks,
Rob