当前位置:网站首页>Get started quickly using the local testing tool postman

Get started quickly using the local testing tool postman

2022-07-08 00:57:00 Xiaozhi re0

First download postman Tools windows Version download address


postman Is a web page debugging and sending web pages http Requested interface test tool .
You can choose to use the client program or web plug-in version .

 Insert picture description here


After installation , Take a brief look at this area .
 Insert picture description here


Necessary conditions :

  • Request address url
  • Request protocol :http,webservice
  • Request mode :get.post…
  • Request header
  • Parameters : Forms / Data submitted by the requestor

postman General workflow of

 Insert picture description here


Simulation document case description :
1. Mobile home location query

  • Address of the interface :http://apis.juhe.cn/mobile/get
  • Returns the format :json/xml
  • Request mode get
  • Request example :http://apis.juhe.cn/mobile/get?phone=123&key= Applied key

 Insert picture description here


Parameter format :

  • Key value pair : {“key”:"value,“name”:“xiaozhi”}
  • xml: Custom tags
  • Text format
  • html Format : label

get When asked , The parameters are written in params in , post When asked , Data parameter writing body in ;
 Insert picture description here


After sending the request, you can see the response data here
 Insert picture description here


Data files that can store analog responses

 Insert picture description here


Be careful , If you are using body Simulate sending data , need json/html… Format , First choose raw, Then select the format .
 Insert picture description here


Be careful ,form-data You can also put files for testing

 Insert picture description here


 Insert picture description here


Some file transfers , You can also choose to use it binary Format

 Insert picture description here


原网站

版权声明
本文为[Xiaozhi re0]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/189/202207072159560329.html