Changes between Version 5 and Version 6 of web-intf


Ignore:
Timestamp:
12/07/2011 11:39:06 AM (14 years ago)
Author:
yangbo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • web-intf

    v5 v6  
    44{{{ 
    551.当接口处理正常时,HTTP STATUS CODE 返回给200。包括有正常的业务数据和数据为空的情况。 
     6 
    672.当接口处理异常时,HTTP STATUS CODE 返回给500,并且给出具体的错误信息。 
    7 {{{ 
    8  
    9 { 
     8    { 
    109        "uri" : "/intf/albums-by-type.jsp", 
    1110        "error-code":"20502", 
    1211        "error-desc":"Need you follow uid.", 
    1312        "user-notice":"给用户的提示放在这里" 
    14 } 
    15  
    16 }}} 
     13    } 
     14 
    1715     
    18163.接口默认的字符编码是UTF-8,接口需要实现对req-enc和resp-enc参数的支持。在JSP的最顶部,实现类似下面的代码: 
     
    2725            response.setCharacterEncoding(responseEncoding); 
    2826        } 
     27 
    29284.所有有写操作的数据接口,必须用POST方式提交,在接口里需要判断提交方式,拒绝GET的调用请求。 
    3029