提交当前本机整理版本
This commit is contained in:
@@ -340,4 +340,28 @@ namespace Lskj.Control.BrowserSetting
|
||||
byteRequest = Encoding.UTF8.GetBytes(builder.ToString());
|
||||
break;
|
||||
}
|
||||
|
||||
httpWebRequest.ContentLength = byteRequest.Length;
|
||||
}
|
||||
Stream stream = httpWebRequest.GetRequestStream();
|
||||
stream.Write(byteRequest, 0, byteRequest.Length);
|
||||
stream.Close();
|
||||
|
||||
httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
|
||||
Stream responseStream = httpWebResponse.GetResponseStream();
|
||||
StreamReader streamReader = new StreamReader(responseStream, Encoding.UTF8);
|
||||
result = streamReader.ReadToEnd();
|
||||
streamReader.Close();
|
||||
responseStream.Close();
|
||||
cookie = httpWebRequest.CookieContainer;
|
||||
cookieCollection = cookie.GetCookies(new Uri(url));
|
||||
return httpWebResponse;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
cookieCollection = null;
|
||||
result = ex.Message;
|
||||
return httpWebResponse;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user