public async Task InvokeAsync(HttpContext httpContext, ITimer timer, ILogger <Order> logger) { string currenttime = timer.GetCurrentTime(); string cfg = timer.GetConfig("id", "age", "color", "name", "city", "person:company:companyname"); string login = ""; logger?.LogInformation($"Process info {httpContext.Request.QueryString}"); if (httpContext.Request.Cookies.TryGetValue("login", out login)) { await httpContext.Response.WriteAsync($"current time is {currenttime} \n config:\n{cfg} \n LOGIN = {login}"); } else { httpContext.Response.Cookies.Append("login", "login1"); await httpContext.Response.WriteAsync($"current time is {currenttime} \n config:\n{cfg} \n LOGIN = {login}"); } //await httpContext.Response.WriteAsync($"current time is {currenttime} \n config:\n{cfg}"); }