Skip to main content

postman安装

posman下载

下载地址:https://www.postman.com/downloads/
历史版本下载
mac: https://dl.pstmn.io/download/version/11.7.0/osx
mac arm:https://dl.pstmn.io/download/version/11.7.0/osx_arm64
windows: https://dl.pstmn.io/download/version/11.7.0/win64
linux: https://dl.pstmn.io/download/version/11.7.0/linux64

安装

安装后默认会弹出登录界面,建议登录
也可以不登录,选择continue with the lightweight API client

新建HTTP请求

new --> HTTP Request
method 选择 GET
url 填写 https://www.baidu.com
点击send

导入curl请求

点击Import 粘贴从chrome浏览器复制的curl请求 (copy as curl bash)

导出curl请求

点击请求右侧的</>按钮

pre-request

pre-request脚本:在发送请求之前执行,可以在这里定义变量,然后在请求中引用这些变量。
经常用于处理token获取,签名校验场景。