问题描述
我想获取http://taoke.alimama.com/rpc/searchAuctionByRpc.do?pw=%71%58%73%6f%78%2b%77%3d&rowoffset=1&rowcount=40&keyword=Nike此链接的源文件,用ASP,PHP都可以轻松获取,但用ASP.NET的WebClient,HttpWebRequest都无法取到数据,原因在于pw=后的"%71%58%73%6f%78%2b%77%3d"在用HttpWebRequest,WebClient时,URL都会将那串字符转成qXsox+w=,而我URL请求的必须是UrlEncode(qXsox+w=)后的字符串,我试着将"%71%58%73%6f%78%2b%77%3d"再UrlEncode一次,转成"%25%37%31%25%35%38%25%37%33%25%36%66%25%37%38%25%32%62%25%37%37%25%33%64",结果还是不行,HttpWebRequest,WebClient请求的URL变成了"%2571%2558%2573%256f%2578%252b%2577%253d",那个%25又无法转义为%.望各们高手出手帮帮小弟我。
时间: 2024-10-13 00:19:22