Ejemplo n.º 1
0
        public IActionResult Get([FromRoute] long dataSize)
        {
            Console.WriteLine($"{this.Request.Method} {this.Request.GetDisplayUrl()}");
            this.PrintHeaders();

            var stream = new RandomReadOnlyStream(dataSize);

            return(this.Ok(stream));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> PostAsync([FromRoute] long dataSize)
        {
            Console.WriteLine($"{this.Request.Method} {this.Request.GetDisplayUrl()}");
            this.PrintHeaders();

            long totalBytesRead = await this.ReadStreamAsync(this.Request.Body);

            Console.WriteLine($"totalBytesRead {totalBytesRead}");
            var stream = new RandomReadOnlyStream(dataSize);

            return(this.Ok(stream));
        }