我想我有点疯了,当我在本地网络服务器上测试它时,当我去现场网站时它工作正常,它返回一个空白字符串而不是我期望的数据
我对 C# 不太熟悉,所以我只是想检查一下我做对了。数据只是纯 ascii 文本
wc = new WebClient();
wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
response = wc.UploadData(this.urlUpdate, Encoding.ASCII.GetBytes("data=" + HttpUtility.UrlEncode(buf.ToString())));
s = Encoding.ASCII.GetString(response);