日期:2014-05-17 浏览次数:20602 次
string responeJsonStr="**********";//json格式
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
Stream reqstream = req.GetRequestStream();
byte[] b = Encoding.ASCII.GetBytes(responeJsonStr);
reqstream.Write(b, 0, b.Length);
StreamReader responseReader = new StreamReader(req.GetResponse().GetResponseStream(), System.Text.Encoding.UTF8);
public void ProcessRequest(HttpContext context)
{
//根据接口获取积分
string postStr = "";
if (context.Application["token"] == null)
{
context.Application["token"] = WenXin.GetAccessToken();
ShowMenu();
}