This article mainly explains the use of postman post request method in two ways to pass parameters: json format, form format
First of all, understand that postman for interface testing, the must condition is:
request address
request agreement
request method
request header
parameters
json format
Look at the interface documentation and fill in the necessary parameters in the postman according to the interface documentation
post request method, using json format to pass parameters, in the request headers (headers) header information, add data format: content-Type, value is application/json, the
In the request body body, write in raw mode, write the parameter information in json format
Complete the above information and click [send] to send the request request.
In the response message, select the json format to view the result
Format — urlencoded pass parameter
Interface address: http://test.lemonban.com/ningmengban/mvc/user/login.json
Request method: post
post request format: application/x-www-form-urlencoded———–> means that the form format to pass parameters
username:13916686542
password:b5523f18a092325c5d19f0809c262563
The form passes the parameters, which are set in params.
Or configure it as follows
Then set the data format in headers and click send,to get the response result.