当前位置:网站首页>What about the interface that needs to be logged in first when using the apipost test interface (based on cookies)?
What about the interface that needs to be logged in first when using the apipost test interface (based on cookies)?
2022-06-10 10:58:00 【zyf20010801】
Developing in the background 、 When debugging the interface , There are often interfaces that require login to request .
such as : Get login user's favorite list , here , We need to simulate the login state for interface debugging . Pictured :
today , Let's explain the use of ApiPost Environment variables of , Solve the interface dependency that needs to be logged in first and then requested .
ApiPost brief introduction :
ApiPost It's a support team collaboration , And can directly generate the API debugging 、 Management tools . It supports simulation POST、GET、PUT Etc , Is the back-end interface developer or front-end 、 A rare tool for interface testers .
Download address :https://console.apipost.cn/register?utm_source=10009
Using environment variables , First request the login interface , Then request the subsequent interface
1、 First request the login interface :
In order to be in landing mode , You need to request the login interface first , This is to simulate the user's login behavior , Get the required login parameters ( Here is Cookie).
Return the login interface PHPSESSID( This is SessionID,PHPSESSID Is aimed at PHP As a back-end interface SessionID Variable name , Variable names in other languages may be different ) Set as environment variable .
2、 Then return to the collection interface , Click on 【 send out 】 The triangle next to the button , choice 【 belt Cookie】, Input PHPSESSID={{login_var}}.
This is to use the login interface to return Cookie Falsifying a request PHPSESSID.
Pictured :
3、 Next send, You can see my collection list .
principle :
utilize ApiPost send out Cookie, Make the server recognize the logged in user's Cookie.
边栏推荐
- [time series prediction] esrnn paper reading
- MySQL architecture
- Question bank and answers of 2022 metal and nonmetal mine hoist operation examination
- AttributeError: module ‘gym.envs.box2d‘ has no attribute ‘LunarLander‘ 解决办法
- 渡远户外冲刺深交所:年营收3.5亿 林锡臻家族色彩明显
- Conversion between binary, octal, decimal and hexadecimal (integer plus decimal)
- PV操作每日一题-独木桥问题
- PV operation daily question - orange apple question (advanced version)
- 钰泰半导体冲刺科创板:年营收8.3亿 实控人为美国籍
- 【通信协议】UART,I2C,SPI复习
猜你喜欢

Academic lecture: masp for multi label active learning

Review the growth evaluation of central enterprises and listed companies

Leetcode 1991. Find the middle position of the array (brute force enumeration)

杰理之BLE IO 口中断及翻转【篇】

杰理之长按复位及高电平复位【篇】

Analysis: a stable currency is not a "stable currency", but a product in essence

No subnet partition? Rego will help you understand IP addresses and teach you how to divide subnets!

解析:稳定币不是「稳定的币」 其本质是一种产品

效率工具 : uTools

MySQL practice 45 lectures_ 8_ Deepen the understanding of MySQL repeatable reading from a problem
随机推荐
Modstartcms enterprise content site building system (supporting laravel9) v4.1.0
PV operation daily question - buffer problem
It's more convenient to keep warm water. It's a small artifact for daily milk brewing. It's a colorful jingle wireless portable milk mixer
解析:稳定币不是「稳定的币」 其本质是一种产品
Working principle and application of single chip trigger or not gate
最近几篇较好论文实现代码(附源代码下载)
常用颜色RGB、灰度值、取色值、透明度。
数商云家具行业供应商评估管理系统:提升家具企业核心竞争力,实现数字化协同管理
可以在网上炒股开户吗?是安全的吗?
微信小程序注册流程详解
企评家分不同维度解析:湖南长城科技信息有限公司企业成长性
子网划分不会?瑞哥带你深入理解IP地址,手把手教你子网划分!
杰理之BLE IO 口中断及翻转【篇】
golang线程安全的本地map -- gocache
PV操作每日一题-缓冲区问题
GAN学习笔记-KL散度(Kullback-Leibler Divergence)、JS散度(Jensen–Shannon divergence)、Wasserstein Distance
No subnet partition? Rego will help you understand IP addresses and teach you how to divide subnets!
Pat class a 1134 vertex coverage
Review the growth evaluation of central enterprises and listed companies
Fortex方达发布电子交易生态体系 与客户共享共赢