C# 在Visual Studio 2017中通过c发送http get

C# 在Visual Studio 2017中通过c发送http get,c#,http,get,C#,Http,Get,我正在尝试发送此数据: GET /sms/send?number=4793224070&message=hei HTTP/1.1 Authorization: Basic bmV0Y89tOm3ldJNvbXh5eg== User-Agent: Java1.3.1_01 Host: localhost:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive 作为通

我正在尝试发送此数据:

GET /sms/send?number=4793224070&message=hei HTTP/1.1
Authorization: Basic bmV0Y89tOm3ldJNvbXh5eg==
User-Agent: Java1.3.1_01
Host: localhost:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive 
作为通过c的http get请求。我在一天的时间里读了《学习c》并理解了一点c,但我似乎无法理解这一点。我已经走了这么远:

WebRequest request = WebRequest.Create("http://firebolt.netcom.no:8080/sms/send");

Get Data包含在URL中,Post数据包含在您的请求中

这是我通常使用的:

WebClient client = new WebClient();

//Get request
//                                                                              | GET DATA                   |
string response = client.DownloadString("http://firebolt.netcom.no:8080/sms/send?number=4793224070&message=hei");

//Post request
NameValueCollection nvc = new NameValueCollection(); //Stores post data
nvc.Add("number", "4793224070"); //value 1
nvc.Add("message", "hei"); //value 2
byte [] tmp = client.UploadValues("http://url.com/", nvc); //request
response = Encoding.UTF8.GetString(tmp);

密码被打乱了。这里是粘贴代码的链接:它没有被置乱,只是格式不正确。你没有在URL上包含查询字符串。有人能告诉我正确的方向吗?或者让我看看它是怎么吃的。我似乎想不出来我还是不明白。。。。。我该怎么做才能让它执行请求?字符串响应=client.DownloadString;