Reputation: 193
I have a Azure Logic App with a http trigger and would like to call this logic app with a Azure Function. I have tried to make a post call using the Requests Library. The code looks sth like this:
import requests
url='https://prod-56.westeurope.logic.azure.com:...'
requests.post(url)
When I try this code with VS Code it works. But somehow it doesn't work in Azure Functions. I have already changed CORS in the Azure function to allow all but it still didn't work. Any idea how i can call the logic app with a azure function in python?
Upvotes: 0
Views: 1699
Reputation: 11218
I have reproduced in my environment and got expected results and i followed below process:
Firstly , I created http trigger in my local vs code as below and i added the code which i need to call logic app as below:
url='XX'
requests.post(url)
XX- url of logic app
My requirements.txt:
Then i deployed my function to azure and in portal requirements looks like below:
In code test of function:
Then in logic app( My logic app got triggered):
Upvotes: 1