在这里,我不想等待服务器的响应,因为我不关心这些 httpwebrequest 的响应。
可以吗?还是以后会影响系统?
HttpWebRequest PostRequest = (HttpWebRequest)WebRequest.Create(PostUrl);
PostRequest.ContentType = PostContentType;
PostRequest.Method = "POST";
byte[] bytes = Encoding.ASCII.GetBytes(DataUrl);
try
{
PostRequest.ContentLength = bytes.Length;
using (Stream webpageStream = PostRequest.GetRequestStream())
{
webpageStream.Write(bytes, 0, bytes.Length);
}
}
catch (Exception ex)
{
//
}
谢谢