In python you can use
A sample would be like:
Now another issue happens and a
#python #requests #InsecureRequestWarning #verify #urllib3
requests
to connect to an endpoint an fetch result or create a new endpoint and so on. When you GET
result from an endpoint which has an invalid https, the library will give an error. In order to solve this problem you can pass verify=False
to requests.get()
.A sample would be like:
payload = requests.get(url, auth=HTTPBasicAuth(username, password), verify=False)
Now another issue happens and a
WARNING
message appears in your log InsecureRequestWarning
. You can surpass this message as well by the command below:from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
NOTE:
I have done this on a local server behind a firewall, be extremely cautious in case you want to do this on your production server.#python #requests #InsecureRequestWarning #verify #urllib3