前台Post json数据,后台强制接受json数据

public void getjsonData (){

var request = System.Web.HttpContext.Current.Request;
byte[] requestData = new byte[request.InputStream.Length];
request.InputStream.Read(requestData, 0, (int)request.InputStream.Length);
var jsonData = Encoding.UTF8.GetString(requestData);

}

posted @ 2020-09-24 16:53  姜佳泉  阅读(243)  评论(0编辑  收藏  举报