Example #1
0
        public override void Process(HttpMessage message)
        {
            // Some tests will check if the Request Content is being read (to
            // verify their Progress handling) so we'll just copy it to a
            // MemoryStream
            if (message.Request.Content != null &&
                message.Request.Content.TryComputeLength(out long length) &&
                length > 0)
            {
                using (MemoryStream stream = new MemoryStream((int)length))
                {
                    message.Request.Content.WriteTo(stream, message.CancellationToken);
                }
            }

            message.Response = GetResponse(_session.Lookup(message.Request, _matcher));
        }
Example #2
0
 public override void Process(HttpPipelineMessage message)
 {
     message.Response = GetResponse(_session.Lookup(message.Request, _matcher));
 }