惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - 天生舞男

多个平均数列的子查询 迁移sharepoint Sharepoint迁移数据库之绝版(只要照着做,一定能够迁移成功) Sharepoint的webpart 虚函数和非虚函数的调用基本原则 The visio to drawing project chart. - 天生舞男 Using MSChart from a C# WinForm About the deeply copy 学习程序的自我建议---从实际软件的源代码开始学习 MS bug "The connection pool" in Oracle 10g and the data sort according to specified filed on DataGrid control. Post method tip automation服务器不能创建对象 Get the biggest common divisor rose破解 ArrayList按Index删除的问题 Recently expection RadioButtonList中选择框和文字对不齐的解决办法 resolve problem best method is find document from official document 看了宝玉的作品,心理甚是感叹
How to get response content with specified post data by post method
天生舞男 · 2006-03-08 · via 博客园 - 天生舞男


                ''~``
                        ( o o )
+------------------.oooO--(_)--Oooo.---------------------+
| Li xiaojian                                            |
|                       E-mail: joblxj@163.com           |
| Fake Company          www.intechno.com                 |
| beijing, china     (   )                               |
+---------------------\ (----(   )-----------------------+
                       \_)    ) /
                             (_/
private void QueListSubmit_Click(object sender, System.EventArgs e)
  {
   divQueListData.InnerHtml = "";
   string strUser = tbxUser.Text;
   string strHost = tbxHost.Text;
   string strResult = string.Empty;
   string strPostData = "User=" + strUser + "&Host=" + strHost;
   string strdesc="";
   HttpStatusCode code = 0;

   HttpWebResponse myResponse = null;
   HttpWebRequest myRequest = null;

   try
   {
    string httpURI = tbxTestURL.Text;
    myRequest = (HttpWebRequest)WebRequest.Create(httpURI);
    myRequest.Method = "POST";
    myRequest.ContentType="application/x-www-form-urlencoded";    
    
    Encoding encoder = System.Text.Encoding.GetEncoding("utf-8");
    byte[] byteArray = encoder.GetBytes(strPostData);
    Stream myGetRequestStream = myRequest.GetRequestStream();
    myGetRequestStream.Write(byteArray, 0 , byteArray.Length);
    myGetRequestStream.Close();
    
    myResponse = (HttpWebResponse)myRequest.GetResponse();
    Stream ReceiveStream = myResponse.GetResponseStream();
    code = myResponse.StatusCode;
    strdesc = myResponse.StatusDescription;
    StreamReader sr = new StreamReader(ReceiveStream, encoder);
    Char[] read = new Char[256];
    int count = sr.Read( read, 0, 256 );
    while (count > 0)
    {
     String str = new String(read, 0, count);
     strResult += str;
     count = sr.Read(read, 0, 256);
    }
    divQueListData.InnerHtml = "<pre>"+strResult+"</pre>";
   }
   catch(WebException ex)
   {
    code = ((HttpWebResponse)ex.Response).StatusCode;
    strdesc = ((HttpWebResponse)ex.Response).StatusDescription;
   }
   divQueListData.InnerHtml += "<br>Http Status Code = " + code.ToString() + "</br>";
   divQueListData.InnerHtml += "<br>Http Status Description = "+ strdesc.ToString() +"</br>";
  }