请求和接收 .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"}

posted @ 2020-03-23 15:42  enych  阅读(342)  评论(0编辑  收藏  举报