How will I call an azure web app from a html hyperlink?

2020-06-17T10:00:13.5+00:00

Hi,
I have made an azure web app which sends email to outlook.

In the email html body there is one hyperlink and when user clicks on that link, it will call another azure web app. So, right now my requirement is to connect with another azure web app using the hyperlink. The azure web app is written in python flask and I need to call that flask app from the hyperlink.

How to configure that in the hyperlink and call another azure web app ?

Any suggestion will help.

Thanks in advance.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,956 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 26,146 Reputation points Microsoft Employee
    2020-06-22T19:39:44.99+00:00

    Hi @MITRADebarthaGECoreTechCyber-2843,

    Depending on how your API call is, add requests package and something very simiilar to this should work:

     @app.route('/hello')
     def hello():
         r = requests.get('http://yourapp.azurewebsites.net')
         return r.text
    

    See https://stackoverflow.com/a/25154944/10987310.

    0 comments No comments