1. 程式人生 > >從HttpRequestMessage的Content中同步讀取Stream

從HttpRequestMessage的Content中同步讀取Stream

同步 see form let nsf http one ont letter

??代碼例如以下:
var sc = Request.Content;
using (MemoryStream tempStream = new MemoryStream()) { sc.CopyToAsync(tempStream).Wait();
tempStream.Seek(0, SeekOrigin.Begin); }

從HttpRequestMessage的Content中同步讀取Stream