How to call a Rest Api from an azure function?

Eddynson Vega 152 Reputation points
2022-01-14T20:05:28.103+00:00

They can help me build an api call, using Azure Function. The structure is as follows:

165227-image.png

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,981 Reputation points Moderator
    2022-01-17T06:21:18.487+00:00

    @Anonymous As @Lohith GN mentioned you can create the HttpClient object to make the HTTP calls within your azure function if you are using C# language function app.
    Depending upon your requirement you can create any of supported trigger to trigger your function app and your function app code will make the HTTP calls.

    You can refer to Call a Web API From a .NET Client (C#) document for more details.
    Sharing the previous discussion on the same.
    https://stackoverflow.com/questions/56288606/best-approach-to-call-web-api-from-azure-function
    https://social.msdn.microsoft.com/Forums/en-US/300c0478-dad4-49d0-bbed-8177adbbf817/using-azure-functions-with-c-to-call-rest-api-and-save-results-in-azure-data-lake-gen2?forum=AzureFunctions

    Feel free to get back to me if you need any assistance.

    4 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.