private static MidFunc AppendStream(StreamResource stream) => async(context, next) =>
        {
            var options = await AppendStreamOperation.Create(context.Request, context.RequestAborted);

            var response = await stream.Post(options, context.RequestAborted);

            await context.WriteResponse(response);
        };
コード例 #2
0
        private static MidFunc AppendStream(StreamResource stream) => next => async env =>
        {
            var context = new OwinContext(env);

            var options = await AppendStreamOperation.Create(context.Request, context.Request.CallCancelled);

            var response = await stream.AppendMessages(options, context.Request.CallCancelled);

            await context.WriteHalResponse(response);
        };