ASP.NET用post的方式传参的话,参数该怎么写
发布网友
发布时间:2022-10-04 00:00
我来回答
共1个回答
热心网友
时间:2023-10-12 08:22
string postData = "sort=xxxxx&type=xxxxxx";
byte[] bytes = Encoding.ASCII.GetBytes(postData);
Stream sendStream = request.GetRequestStream();
sendStream.Write(bytes, 0, bytes.Length);
sendStream.Close();
HttpWebResponse response1 = (HttpWebResponse)request.GetResponse();
你试试这个。