Upto now i used only one azure function http trigger do functionality. However, i got a new requirement to call a one azure function app F1 in another azure function app F2. I want to use the function app F1 using dll and function.json file in azure function app F2.
Function.json of F1:
{
"generatedBy": "Microsoft.NET.Sdk.Functions-1.0.24",
"configurationSource": "attributes",
"bindings": [
{
"type": "httpTrigger",
"methods": [
"get",
"post"
],
"authLevel": "anonymous",
"name": "fnRequest"
}
],
"disabled": false,
"scriptFile": "**Function F1 dll path**",
"entryPoint": "FunctionApp1.Function1.Run"
}
Function2:
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using FunctionApp1;
namespace FunctionApp2
{
public static class Function2
{
[FunctionName("Function2")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ExecutionContext executionContext)
{
return await Function1.Run(req, executionContext);
}
}
}
could anyone please help me out for the procedure to call.
Thanks in advance!.