Postman creates a project to initiate request processing for the interface

Before reading this article, you need to understand a few simple workspaces of Postman. If you haven’t mastered it yet, you can check my article for a
simple understanding of the Postman interface operation.
After mastering it, we can officially start our interface test.

We first select Collections,
insert image description here
click the plus sign above to pull out one more item,
insert image description here
then we select the item we just clicked with the plus sign, click the pen next to the name to change the name, enter the name
insert image description here
we want to name, and then click the position outside the input box It can be saved
insert image description here
, and then we right-click on the project and select Add request to create a request,
insert image description here
so that one of our request bodies comes out.
insert image description here
Here is a request logic created by myself with springboot. Splicing and putting the content back
insert image description here
here, you can also find a way to get an interface out

Then we go back to Postman, click on the request we just created, and then click on this pen to change the name.
insert image description here
After the input is complete, click on a position other than the input box or press Enter. Then select
insert image description here
the request method here. I choose get
insert image description here
and enter this position. Take a look at the requested address.
insert image description here
There are often parameters following the path question mark. For example, path?kye="222"
You only need to put the entire path up, and it will automatically remove the key-value pairs after the question mark for you.
insert image description here
Let’s take a brief look. Most of the time, Params on this interface
is where the get request parameters are placed.
insert image description here
Authorization is used to make sound
insert image description here
Headers. It represents the content of the request header.
insert image description here
Body is the method of parameter transmission used in post requests most of the time
insert image description here
.
insert image description here
Tests is the script after the request.
insert image description here
Settings is some settings
insert image description here
. The body has many parameter forms. The default
none means nothing . The following is the x-www-form-urlencoded that can transfer files in the form-data form. It can only be a key-value pair. If it is raw, you can pass many parameters, especially our json form. You can choose the type binary here to convert the file in binary mode. Passing parameters is often useful
insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here
In fact, I don’t think it’s useful for the last one.
insert image description here
There’s also a cookie here, which is mainly to manage our cookie information.
insert image description here
Then here we click Send to send the request,
insert image description here
and the result of the request will appear below.
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45966674/article/details/130458350