postman发送get和post请求

一、postman发送get请求

 

在地址栏里输入请求url(用到拼接方式):http://127.0.0.1:8081/getuser?userid=1

选择“GET”方式,

点击“send”得到json数据如图

 

二、postman发送json格式的post请求

 

在地址栏里输入请求url:http://127.0.0.1:8081/getmoney

选择“POST”方式,

在“headers”添加key:Content-Type  , value:application/json

点击"body",''raw''并设定为JSON

添加:

{"userid": 1}

点击send发送即可

posted @ 2018-10-24 00:03  远里歌声_why  阅读(315)  评论(0编辑  收藏  举报