How to use postman to test the HTTP interface that requires cookies?

Application scenario: To
test an http interface, you need to see whether the data returned by each process node is normal when the user logs in.
The tool used is postman, and the implementation of the login state requires the addition of cookies. The specific use is the PPU in the cookies (which developer needs to ask for specifics)

1. How to get cookies?

Open a browser on the computer, enter the link, and then enter the account password to log in. Press Fn + F12 to check the interface elements.
As shown in the figure: Copy the value of the ppu I need and the domain name of the Domain
(if you are not accessing the .58.com domain name, you do not need to copy the domain name of the Domain)
Insert picture description here
2. How to add postman cookies?

Open the postman tool, enter the link, and click the cookies button. After clicking
Insert picture description here
the cookies, a pop-up window will appear . In the input box below, enter the domain name of the domain such as .58.com, and then click add
(if you are visiting 1.1.1.1:8888, you What needs to be input is 1.1.1.1)
Insert picture description here
Insert picture description here
Insert picture description here
Done! ! ! At this time, when you go to adjust the interface, you bring the login information ~

Published 22 original articles · won praise 5 · Views 4308

Guess you like

Origin blog.csdn.net/weixin_42231208/article/details/103053915