postman-- base operation --API response request and response --API

API response from the body, cookies, headers, test results and status information components.

--------------------------------------------------------------------------------------------------------------------------------------

http response message structure: web server sends to the browser http response message content:


Response message structure, and the structure is substantially the same Request message. It is also divided into three parts:

The first part is called Response line, ------------> response line

The second part is called Response header, ------------> response headers

The third part is the body, ------------> body


There is also a blank line between the header and the body.

--------------------------------------------------------------------------------------------------------------------------------------

HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Sat, 07 Dec 2019 09:05:17 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN

49 
{ "respCode": " 00 ", "respDesc": "user account information for verification is successful", "Data": null }
 0

 

 

 

(1), body: in response to the request body, Postman provides three ways to view the response body, respectively: pretty, raw, preview. Which pretty is the default mode;

 

                      pretty view display json or xml format in response thereof, to view

 

 

 

The system can also force set the default view mode:

 

 

 

 PS:如果返回的是二进制类型的文件,应该选择发送和下发保存到本地进行查看。

         preview选项卡,将响应呈现一个iframe沙箱中。一些web框架默认返回html错误,而预览模式在这种情况下特别有用。

                                    由于iframe沙箱限制,JavaScript和图像在iframe中禁止显示;

 

        raw视图以一个大文本区域的方式显示响应主体。

 

 

 

========================================================================================================================

 

 

 

(2)、cookies:服务器发送的cookies在cookies选项卡中可见。

 

 

 

 

===================================================================================================================

 

 

(3)、headers:headers选项卡下为键值对。

 

 

 

 

 

===================================================================================================================

 

 

 

 

(4)、test  results:test  results选项卡,展示该请求所有测试项的本次允许结果。

 

 

 

 

==============================================================================================================

 

 

(5)、响应信息:状态码状态、状态码描述、时长(服务器返回响应的时间,单位ms)、响应体大小(单位kb);

 

 

 

 

=====================================================================================================================

 

 

 

 

(6)、复制响应,搜索响应(body选项卡界面下操作);

 

 

 

 

===================================================================================================================

 

 

(7)、保存响应或者把响应保存为示例:

Guess you like

Origin www.cnblogs.com/xiaobaibailongma/p/12131007.html