研究了两天 记录下
/// <summary>
/// 接收二维码
/// </summary>
/// <returns></returns>
[HttpPost]
[ApiExplorerSettings(GroupName = "core")]
public string getqrcord()
{
//获取字符流
Stream stream = HttpContext.Request.Body;
byte[] buffer = new byte[HttpContext.Request.ContentLength.Value];
stream.Read(buffer, 0, buffer.Length);
string content = Encoding.UTF8.GetString(buffer);
Logs.WriteLog("qrcode", content, hostingEnvironment);
//返回字符流
return "code=0000";
}