发送请求的代码如下:
 //发送请求
            HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(service);
            myRequest.Method = "POST";
            myRequest.ContentType = contenttype;
            myRequest.ContentLength = para.Length;
            Stream newStream = myRequest.GetRequestStream();
            // Send the data.
            ASCIIEncoding encoding = new ASCIIEncoding();                        //Byte[] bb = Encoding.GetEncoding("GBK").GetBytes(para); ;
            byte[] postdata = encoding.GetBytes(para);
            //byte[] postdata = Encoding.Default.GetBytes(para);
            newStream.Write(postdata, 0, para.Length);
            //newStream.Write(bb, 0, para.Length);
            newStream.Close();