在這裏我不想等待服務器的響應,因爲我不在意這些httpwebrequest的響應 。做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)
{
//
}
感謝
關閉不需要,因爲使用將處理該部分。 –