httpwebrequest + response .. Get and Post [英] httpwebrequest + response .. Get And Post

查看:78
本文介绍了httpwebrequest + response .. Get and Post的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,,,我在这个网站上新...所以希望这个网站和它的程序员有用...



i想得到和发布...我想要注册新的Accout FRom网站....我有一些关于它的通知..但这是我的第一次尝试,我不理解它,怎么有一些关于获取和发布的信息



获取:

Hi All ,,, Im New In This Site ... So Hope This Site And it''s programers Helpfull ...

i Want the Get And Post ... I Want Register New Accout FRom Site .... THen I have Some Informs about it .. But this is my 1st try and i didnt understand it, how ever thes are some informs about get and post

Get :

<pre lang="c#">f=png");
            this.httpWebRequest.Timeout = 0x3a98;
            this.httpWebRequest.Method = "Get";
            this.httpWebRequest.UserAgent = "Java/" + this.version_0.ToString();
            this.httpWebRequest.Host = "register.nimbuzz.com";
            this.httpWebRequest.KeepAlive = true;
            this.httpWebRequest.Accept = "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
            this.httpWebResponse = (HttpWebResponse) this.httpWebRequest_0.GetResponse();
            Stream responseStream = this.httpWebResponse_0.GetResponseStream();
            new StreamReader(responseStream);
            bitmap = new Bitmap(responseStream);
        }
        catch
        {
        }





和POST:





And POST :

string s = "s=" + this.httpWebResponse_0.Headers.Get("Session-Id") + "\r\nun=" + Us + "\r\npw=" + Ps + "\r\nc=" + C + "\r\ndid=MIDP\r\nl=en\r\npid=nimbuzz\r\ncid=nimbuzz\r\ne=" + str + "\r\n";
        byte[] bytes = Encoding.UTF8.GetBytes(s);
        this.httpWebRequest = (HttpWebRequest) WebRequest.Create("http://195.211.48.27/register");
        this.httpWebRequest.Method = "Post";
        this.httpWebRequest.UserAgent = "Java/" + this.version_0.ToString();
        this.httpWebRequest.Host = "register.nimbuzz.com";
        this.httpWebRequest.Accept = "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
        this.httpWebRequest.KeepAlive = true;
        this.httpWebRequest.ContentType = "application/x-www-form-urlencoded";
        this.httpWebRequest.Expect = "";
        this.httpWebRequest.GetRequestStream().Write(bytes, 0, bytes.Length);





请所以程序员看看这些代码并尝试注册新的accout并在这篇文章中发表:)



Please So Programmer see at this codes and try register new accout and publish it in this post :)

推荐答案

这个网站程序员看到你的问题在数英里之外: HutspWebRequest / Nutshell中的响应 - 第1部分 [ ^ ]
This sites programmers saw your question coming miles away: HttpWebRequest/Response in a Nutshell - Part 1[^]


这篇关于httpwebrequest + response .. Get and Post的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆