1、文件流写入本地
//Stream stream = res.Content.ReadAsStreamAsync().Result;
//FileStream fs = File.Create("D:\\1.text");
//stream.CopyTo(fs);
//fs.Flush();
//fs.Close();
2、文件流转为tobase64str
byte[] bt = new byte[stream.Length];
//调用read读取方法
stream.Read(bt, 0, bt.Length);
string base64Str = Convert.ToBase64String(bt);
stream.Close();