Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public static async Task<HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequestMessage req, TraceWriter log)
var node = new Uri("http://{username}:{password}@{ipaddress}:9200");
var settings = new ConnectionSettings(node);
var elasticClient = new ElasticClient(settings);
var records = await req.Content.ReadAsAsync<T>();
await elasticClient.IndexManyAsync(timeStampedEvents, "my-index-name");
return req.CreateResponse(HttpStatusCode.OK);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment