public async Task AlexaPostAsync() { Request.EnableBuffering(); using (var reader = new StreamReader(Request.Body)) { var body = await reader.ReadToEndAsync(); var bodyObject = JsonConvert.DeserializeObject <JObject>(body); var sessionId = bodyObject["session"]["sessionId"].Value <string>(); _objectLogger.SetSessionId(sessionId); await _objectLogger.LogObjectAsync(body, HttpContext.TraceIdentifier); Request.Body.Position = 0; await _alexaAdapter.ProcessAsync(Request, Response, _alexaBot); } }
public async Task PostAsync() { await _adapter.ProcessAsync(Request, Response, _bot); }