解决方案 »

  1.   

    无非就是用httpwebrequest模拟。模拟的方法很简单,就是运行你的程序,用fiddler抓报文,然后模仿。
      

  2.   

    有工具
    http://www.tangiblesoftwaresolutions.com/
      

  3.   

    DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);
    try
    {
    //规定格式:http://[邮件主机域名]/api/user/[用户名]@[邮件地址]/mail/-/unread
    string path = "/api/user/" + emailAddress + "/mail/-/unread";
    HttpGet httpGet = new HttpGet("http://" + mailSystemAddr + path);
    //认证信息放在头部
    httpGet.addHeader("Authorization", "simple" + " auth_key=\"" + RequestUtils.encodeStr(MailUtil.ApiKey) + "\",auth_timestamp=\"" + mailTimestamp + "\",auth_signature=\"" + MailUtil.getSignatureForFeed(mailTimestamp));
    httpGet.addHeader("Content-Type", "application/atom+xml;type=entry");
    //发出GET请求
    HttpResponse response = httpclient.execute(httpGet);
    //获取返回状态
    int statusCode = response.StatusLine.StatusCode;