当前位置:网站首页>POSTMAN-REST Client插件的应用
POSTMAN-REST Client插件的应用
2022-06-12 15:15:00 【Stars_min】
POSTMAN-REST Client的概念
+ 是Chrome的一个扩展,可以用来向服务器发送请求和接收响应
REST表示什么
+ Representational State Transfer,REST风格的Web服务,是通过简洁清晰的URL来提供资源链接,客户端通过对URL发送HTTP请求获得这些资源,而获取和处理资源的过程让客户端应用的状态发生改变
请求的方式
| ID | 中文名称 | 英文名称 | 请求资源的方法 |
|---|---|---|---|
| 1 | 增 | Creat | POST |
| 2 | 删 | Delete | DELETE |
| 3 | 改 | Update | PUT |
| 4 | 查 | Read | Get |
举例
- Get请求的实现方式,操作步骤
- 请求资源的方法,这里是Get
- 写入接口地址
- 单击Send按钮

- 发送一个POST请求

- 写入接口地址
- 写入表单数据
- 单机Send按钮

但是,POST请求是需要携带Cookie的。意思就是说,当我们在某个网站执行"发贴"的操作的时候,我们是需要首先登录该网站,才能够被允许执行“发贴”的操作。
所以,我们虽然没有办法在Postman里模拟用户登录,但是我们可以通过携带Cookie的方式来实现"用户是已登录状态"这个场景。来说说操作步骤:
- 单击右上角的Headers按钮
- 此时左侧出现一个表单控件
- 参数写入“Cookie”
- Cookie的值写什么?抓个包吧,登录后随便执行1个操作,然后F12查看Cookie的值,将"Request Headers"下面的Cookie的值都复制下来,然后粘贴到Postman内的Cookie的"Value"这里。

请问,右上角的"URL params"是干什么的呢?
回答:当使用这个按钮操作后,POST请求携带的参数是跟在URL后面的。
请问,POST请求的参数"写在表单内"、"跟在URL后面"这2个方式有什么差别?
回答:差别在于对方如果想要取到参数,前者是从表单内取,后者是从URL取。当然了也可以既从表单内取,同时也从URL取。
资源来源
https://www.cnblogs.com/musicmovie/p/4434052.html
边栏推荐
- TCP/IP 三次握手四次挥手(面试题)
- Swap numbers, XOR, operator correlation
- h3c GR5200路由器上如何设置公网ip可以访问
- Singleton mode instance
- ARM 64指令小记
- 如何给域名前加上 www
- Tensorrt based in-depth learning model deployment practice tutorial!
- Pta: self test -3 array element cyclic right shift problem (20 points)
- Prompt that the program cannot access key files / directories when installing PS software. Error code: 41
- [jvm learning] parental delegation mechanism and PC register (program counter)
猜你喜欢
![[jvm learning] class loading subsystem](/img/60/e863495ce4ea5826d1404a73c90033.jpg)
[jvm learning] class loading subsystem

Assertion of selenium webdriver

Solve log4j2 vulnerability and be attacked by mining and zombie process viruses

Autofac Beginner (1)

C 操作符

Structure example

Pta: self test -3 array element cyclic right shift problem (20 points)

SQL cross database injection

Deepin20.6 rtx3080 installer le lecteur de carte graphique 510.60.02, cuda 11.6, pytorch1.11

Learning records of new keywords, references & pointers
随机推荐
First set and follow set in vernacular
C operator
频繁项集产生强关联规则的过程
简单的爬虫框架:解析51job页面岗位信息
如何给域名前加上 www
ROS beginners write the server that the little turtle rotates a certain angle at a certain speed
解决log4j2漏洞遭到挖矿、僵尸进程病毒攻击
Ngork implements intranet penetration -- free
Some useful websites
Rust tip - running the tensorrt model through FFI programming
Assertion of selenium webdriver
Phpstudy indicates that the hosts file may not exist or be blocked from being opened. How to resolve the failure of synchronizing hosts
Simple crawler framework: parsing 51job page position information
[SPARK][CORE] 面试问题之谈一谈Push-based shuffle
Servlet连接数据库实现用户登录功能
Distributed concurrent repeated submission
Conversion between sparse array and array and file reading and writing
The process of generating strong association rules from frequent itemsets
odom坐标系的理解
Deepin20.6 rtx3080 installing graphics card drivers 510.60.02, cuda11.6, pytorch1.11