http utilities Node.js的基本HTTP实用程序
Node.js的基本HTTP实用程序安装npm install http-utilities初始化var httpUtils = require ( 'http-utilities' ) ;应用程序接口statCode(代码描述符) httpUtils . statCode ( 'ok' ) ; // returns '200' httpUtils . statCode ( 'not_found' ) ; // returns '404' httpUtils . statCode ( 'accepted' ) ; // returns '202' statName(代码编号) httpUtils . statName ( 200 ) ; // returns 'ok' httpUtils . statName ( 500 ) ; // ret
下载地址
用户评论