CreateInvoice renamed
This commit is contained in:
parent
2960e3d3d2
commit
03ebceb38c
1 changed files with 30 additions and 0 deletions
30
TaskRegApp/CreateInvoice.cs
Normal file
30
TaskRegApp/CreateInvoice.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
using System.Net;
|
||||||
|
using Microsoft.Azure.Functions.Worker;
|
||||||
|
using Microsoft.Azure.Functions.Worker.Http;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace TaskRegApp
|
||||||
|
{
|
||||||
|
public class CreateInvoice
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
|
public CreateInvoice(ILoggerFactory loggerFactory)
|
||||||
|
{
|
||||||
|
_logger = loggerFactory.CreateLogger<CreateInvoice>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Function("CreateInvoice")]
|
||||||
|
public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("C# HTTP trigger function processed a request.");
|
||||||
|
|
||||||
|
var response = req.CreateResponse(HttpStatusCode.OK);
|
||||||
|
response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
|
||||||
|
|
||||||
|
response.WriteString("Welcome to Azure Functions!");
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue