private static Task HandleRequest(IDictionary<string, object> environment, Runtime runtime) { var turquoiseEnvironment = new OwinEnvironment(environment); var path = turquoiseEnvironment.RequestPath; var responseStream = turquoiseEnvironment.ResponseBody; var responseHeaders = turquoiseEnvironment.ResponseHeaders; return runtime.HandleRequest(turquoiseEnvironment.RequestMethod, path, turquoiseEnvironment.RequestQueryString, turquoiseEnvironment.RequestHeaders, turquoiseEnvironment.RequestBody, turquoiseEnvironment.ResponseHeaders, turquoiseEnvironment.ResponseBody, statusCode => { turquoiseEnvironment.ResponseStatusCode = statusCode; }); }