gpt4 book ai didi

get - 不安全请求警告 : Unverified HTTPS request is being made in Robot Framework.

转载 作者:行者123 更新时间:2023-12-04 13:23:25 25 4
gpt4 key购买 nike

您好,我正在使用机器人框架。

我正在尝试发送 Get 请求,但收到以下警告

C:\Python27\lib\site-packages\urllib3-1.21.1-py2.7.egg\urllib3\connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning)

有人遇到过这个问题吗?在我寻找解决方案时,其中一项建议是禁用警告,但如何做到这一点?

提前致谢

最佳答案

下面的测试用例运行完美,没有显示警告。请注意 Create Session 关键字上的选项 verify=true

*** Settings ***
Library Collections
Library String
Library RequestsLibrary
Library OperatingSystem

*** Test Cases ***
Get Requests
[Tags] get
Create Session google http://www.google.com verify=true
Create Session github https://api.github.com verify=true
${resp}= Get Request google / timeout=5
Should Be Equal As Strings ${resp.status_code} 200
${resp}= Get Request github /users/bulkan timeout=5
Should Be Equal As Strings ${resp.status_code} 200
Dictionary Should Contain Value ${resp.json()} Bulkan Evcimen

关于get - 不安全请求警告 : Unverified HTTPS request is being made in Robot Framework.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45164763/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com