This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpOptions] | |
public async Task<IActionResult> Options() | |
{ | |
using (var reader = new StreamReader(Request.Body, Encoding.UTF8)) | |
{ | |
// Retrieve the validation header fields | |
var webhookRequestOrigin = HttpContext.Request.Headers["WebHook-Request-Origin"].FirstOrDefault(); | |
var webhookRequestCallback = HttpContext.Request.Headers["WebHook-Request-Callback"]; | |
var webhookRequestRate = HttpContext.Request.Headers["WebHook-Request-Rate"]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Azure.Messaging.ServiceBus; | |
using Microsoft.Azure.Cosmos; | |
using Microsoft.Azure.Documents; | |
using Microsoft.Azure.Documents.Client; | |
using Microsoft.Azure.Documents.Linq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FunctionName("OrderOutboxWorker")] | |
public static async Task Run( | |
[CosmosDBTrigger( | |
databaseName: "%CosmosDBDatabaseName%", | |
collectionName: "%CosmosDBCollectionName%", | |
ConnectionStringSetting = "CosmosDBConnectionString", | |
CreateLeaseCollectionIfNotExists = true, | |
LeaseCollectionName = "%CosmosDBLeaseCollectionName%")] IReadOnlyList<Document> input, | |
[CosmosDB( | |
databaseName: "%CosmosDBDatabaseName%", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 OrderMaker.Models; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Azure.Cosmos; | |
using Microsoft.Azure.Functions.Extensions.DependencyInjection; | |
using Microsoft.Extensions.DependencyInjection; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
[assembly: FunctionsStartup(typeof(OrderMaker.Startup))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class TestFuncApi | |
{ | |
[FunctionName("TestFuncApi")] | |
public static async Task<IActionResult> Run( | |
[HttpTrigger(AuthorizationLevel.Anonymous, "post", "options", Route = null)] HttpRequest req, | |
ILogger log) | |
{ | |
if (req.Method == "OPTIONS") | |
{ | |
// Retrieve the request origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"specversion" : "1.0", | |
"id" : "b85d631a-101e-005a-02f2-cee7aa06f148", | |
"type" : "contoso.loyalty.update", | |
"source" : "https://contoso.com/loyalty", | |
"subject" : "contoso/loyalty/points", | |
"time" : "2021-06-14T10:00:00Z", | |
"data" : { | |
"loyaltyId": "100", | |
"points": "400", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"specversion" : "1.0", | |
"id" : "b85d631a-101e-005a-02f2-cee7aa06f148", | |
"type" : "zohan.music.request", | |
"source" : "https://zohan.dev/music/", | |
"subject" : "zohan/music/requests/4322", | |
"time" : "2020-09-14T10:00:00Z", | |
"data" : { | |
"artist": "Gerardo", | |
"song": "Rico Suave" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Azure.Identity; | |
using Confluent.Kafka; | |
using Microsoft.Azure.Kafka.SchemaRegistry.Avro; | |
using System; | |
using System.Configuration; | |
using System.Threading; | |
using zohan.schemaregistry.events; | |
namespace Zohan.SchemaRegistry.Consumer | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Azure.Identity; | |
using Confluent.Kafka; | |
using Microsoft.Azure.Kafka.SchemaRegistry.Avro; | |
using System; | |
using System.Configuration; | |
using System.Threading.Tasks; | |
using zohan.schemaregistry.events; | |
namespace Zohan.SchemaRegistry.Producer | |
{ |
NewerOlder