博客
关于我
用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中B+Tree索引原理
查看>>
mysql中cast() 和convert()的用法讲解
查看>>
mysql中floor函数的作用是什么?
查看>>
MySQL中group by 与 order by 一起使用排序问题
查看>>
mysql中having的用法
查看>>
MySQL中interactive_timeout和wait_timeout的区别
查看>>
mysql中int、bigint、smallint 和 tinyint的区别、char和varchar的区别详细介绍
查看>>
mysql中json_extract的使用方法
查看>>
mysql中json_extract的使用方法
查看>>
mysql中null和空字符串的区别与问题!
查看>>
Mysql中varchar类型数字排序不对踩坑记录
查看>>
MySQL中地理位置数据扩展geometry的使用心得
查看>>
Mysql中存储引擎简介、修改、查询、选择
查看>>
mysql中实现rownum,对结果进行排序
查看>>
mysql中对于数据库的基本操作
查看>>
mysql中的 +号 和 CONCAT(str1,str2,...)
查看>>
MySql中的concat()相关函数
查看>>
mysql中的concat函数,concat_ws函数,concat_group函数之间的区别
查看>>
MySQL中的count函数
查看>>
MySQL中的DB、DBMS、SQL
查看>>