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即可,是不需要认证证书
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站题目:Postmanhttp/https测试工具-创新互联
网站URL:http://lswzjz.com/article/ccdpgd.html