博客
关于我
用postman测试url参数
阅读量:319 次
发布时间:2019-03-04

本文共 482 字,大约阅读时间需要 1 分钟。

const http = require('http');const querystring = require('querystring');http.createServer((req,res)=>{       if(req.url.startsWith('/login')){           let pdata = '';        req.on('data',(chunk)=>{               pdata += chunk;        });        req.on('end',()=>{               let obj = querystring.parse(pdata);            res.end(obj.id+' ---- '+obj.name);        })    }}).listen(3000,()=>{       console.log('server is on!');})

postman测试时候要选x-www-form-urlencoded,不然会有其他信息出现

在这里插入图片描述

转载地址:http://ontq.baihongyu.com/

你可能感兴趣的文章
MYSQL数据库自动本地/异地双备份/MYSQL增量备份
查看>>
MYSQL数据库进阶操作
查看>>
MySQL数据库高并发优化配置
查看>>
mysql数据恢复
查看>>
MySQL数据的主从复制、半同步复制和主主复制详解
查看>>
mysql数据碎片整理
查看>>
MySQL数据类型
查看>>
MySQL数据读写分离(MaxScale)上干货!!!
查看>>
mysql整库导入、导出
查看>>
mysql文本函数和数字函数
查看>>
Mysql新建用户和数据库并授权
查看>>
mysql日志文件
查看>>
MySQL日期时间函数大全
查看>>
mysql更新一个表里的字段等于另一个表某字段的值
查看>>
Mysql更新时间列只改日期为指定日期不更改时间
查看>>
MySQL更新锁(for update)摘要
查看>>
mysql替换表的字段里面内容
查看>>
MySQL有哪些锁
查看>>
MySQL服务器安装(Linux)
查看>>
mysql服务器查询慢原因分析方法
查看>>