Share via

Azure Functions beginner

Heyoka955 0 Reputation points
2024-06-26T10:03:14.85+00:00

I have an Azure Function with an HTTP Trigger.

The Trigger is always caused by an Submit of an Order in Wixx.

The Issue is that i want to display the data which is given through Wix but i do know how do this and where to look on Azure ?

using Microsoft.AspNetCore.Http;

using Microsoft.AspNetCore.Mvc;

using Microsoft.Azure.Functions.Worker;

using Microsoft.Extensions.Logging;

using Newtonsoft.Json;

namespace FirstFunction

{

public class Function1

{

private readonly ILogger<Function1> _logger;

public Function1(ILogger<Function1> logger)

{

_logger = logger;

}

[Function("Function1")]

public IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequest req)

{

_logger.LogInformation("C# HTTP trigger function processed a request.");

string requestbody = new StreamReader(req.Body).ReadToEnd();

dynamic data = JsonConvert.DeserializeObject(requestbody);

_logger.LogInformation($"C# HTTP trigger function processed a request. {{requestbody}}");

return new OkObjectResult($"Welcome to Azure Functions! {{requestbody}}");

}

}

}

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

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.