HTTP请求乱码问题
我在WinForm程序中要发送一个HTTP请求,但如果Content为中文的话,接受方会出现乱码,Google后知道是要设置编码,但具体怎么设置呢?我是WinForm程序,不是Web程序。
private void SendSMS(string CellPhone, string Content)
{
string url = "http://********com/**php?cid=209&mid=" + CellPhone + "&msg=" + Content;
HttpWebRequest HttpWR = (HttpWebRequest)HttpWebRequest.Create(url);
HttpWR.KeepAlive = false;
HttpWR.GetResponse();
}