In an HTTP triggered azure function we can get the url as follows
public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, Microsoft.Azure.WebJobs.ExecutionContext executionContext, ILogger log)
{
string url = req.Scheme + "://" + req.Host + $"/api/AnotherFunctionOnTheApp";
}
But how do we do it in an event grid triggered function where we do not have the HTTPRequest object?
public static void Run([EventGridTrigger]EventGridEvent eventGridEvent, ILogger log)
{
}
The objective is to call an HTTP triggered function on the same functionapp from the event grid triggered function.