2.1.0 • Published 2 years ago
urlencode_tools v2.1.0
安装
npm install urlencode_tools
导入
// 导入urlencode_tools模块,或者直接导入index.js
const th = require('./index');
使用->获取客户端的post请求数据
// 使用,获取客户端的post数据
console.log(th.par());
结果:
{
name: '张三',
age: '20',
gender: '男'
}
结语
可以用来把客户端的请求体数据给转换为对象格式,并且返回给服务端,
也可以用来给正在学习node.js中间件这一块的人直接下载来使用
/user
http://127.0.0.1/user
开源协议
ISC