Introduction to Postman
Postman is a powerful Chrome plug-in developed by Google that can debug web pages and send HTTP requests to web pages, and can run test cases. Its main functions include:
- Simulate various HTTP requests
From common GET, POST to RESTful PUT, DELETE...etc. You can even send files and send additional headers.
URL
To assemble a Request, the URL is always the first thing you need to fill in. The URL you have entered in Postman can be automatically completed through the drop-down. If you click the Params button, Postman will pop up a key-value editor, where you can enter the parameters of the URL, and Postman will automatically add it to the URL for you. On the contrary, if your URL already has parameters, then Postman will be in the URL. The parameters are automatically loaded when you open the key-value editor
Headers
Click the 'Headers' button, Postman will also pop up a key editor. Here, you can add the Header attribute you want at will, and Postman has passed a very intimate auto-complete function for us. Type a letter, and you can select the standard atrribute you want from the drop-down menu.
Method
It is very simple to select the Method of the Request. Postman supports all Methods, and once you select the Method, Postman's request body editor will automatically change according to your selection.
Request Body
If the request we want to create is similar to POST, then we need to edit the Request Body. Postman provides 4 editing methods according to the body type:
- form-data
- x-www-form-urlencoded
- raw
- binary
Share about my use of postman
I am learning springboot recently. After writing the controller class, I need to test it. For example, I can use postman to add a property with the key as id in postman, add the value value, and fill in the url for testing. The page will return from the database. value read in