restful接口的几点说明

    1)url后面添加参数,可以直接通过&符号链接起来

例如:http://192.168.18.84/axis-cgi/com/ptz.cgi?camera=1&query=position

也可以通过Params的键值对进行填充

    2)认证可以通过Authorization进行添加,根据适当的Type类型进行选择,也可以通过Header进行认证换算后填充,例如

Authorization: cm9vdDpyb290

    3)Postman指定了Connection: keep-alive属性,因此需要服务器端主动断开链接,否则会出现如下的问题: 一直提示Canceling Request,即使是收到了回复

    4)使用https进行请求的时候,如果返回异常,如下:

Could not get any response

There was an error connecting to https://192.168.58.42:8080/cs/restfull/operationRestfullApi/excuteSqlByCode.

Why this might have happened:

The server couldn't send a response:

Ensure that the backend is working properly

Self-signed SSL certificates are being blocked:

Fix this by turning off 'SSL certificate verification' in Settings > General

Proxy configured incorrectly

Ensure that proxy is configured correctly in Settings > Proxy

Request timeout:

Change request timeout in Settings > General

解决方案: 打开settings界面,找到General界面,然后关闭SSL certificate verification即可,是不需要认证证书

5)翻页过程中获取到的数据还是之前的,对方提供的截图是新的

解决方案:关闭postman,重新打开解决问题


遇到问题,尚未解决:

1)postman状态:一直在这个圈里打转

尝试方法无效: 启动cmd, cd %appdata%, del postman

听说原理是:postman测试的数据太多了,缓存过大