请求和接收 .netcore

 

 

C#服务器接受

 string url = request["url"];

  publicasync Task<AjaxResult<List<T_Sys_Suggestion>>> GetDataListByTime(Pagination pagination, string condition, string keyword,

            DateTime? startTime, DateTime? endTime

            , string type

            )

接收请求 直接是 函数的形式参数,或者

 

System.IO.Stream body = Request.Body;

byte[] bUserInfoSearch = body.ReadToBytes();

//utf8编码读取数组

string strUserInfoSearch = System.Text.Encoding.UTF8.GetString(bUserInfoSearch);            //{"type":0,"PageIndex":1,"PageRows":10,"SortField":"CreateTime","SortType":"desc"}

原文地址:https://www.cnblogs.com/enych/p/12552553.html