在php中我发布了一个请求
$.post("/service.php?cat=c1", {
group: $this.attr('href'),
})
其中组-> #$!/mycat/year,2012
现在我想在 c# 中做同样的请求
var httpWebRequest = (HttpWebRequest)WebRequest.Create( url);
httpWebRequest.ContentType = "text/json";
httpWebRequest.Method = "POST";
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
result = streamReader.ReadToEnd();
}
我试过
String url = domain + "./service.php?cat=c1&group=%22#$!/mycat/year,2012%22";
和
String url = domain + "./service.php?cat=c1&group=mycat&year=2012";
但是“消息”总是返回空 这里有什么问题?