Categories
Python Answers

How to fix Python Requests throwing SSLError?

Spread the love

Sometimes, we want to fix Python Requests throwing SSLError.

In this article, we’ll look at how to fix Python Requests throwing SSLError.

How to fix Python Requests throwing SSLError?

To fix Python Requests throwing SSLError, we can set the verify argument.

For instance, we write

requests.get('https://example.com', verify=True)

to call requests.get with the URL and the verify argument set to True to verify the SSL certificate when making the GET request.

We can set verify to False to skip verification.

Conclusion

To fix Python Requests throwing SSLError, we can set the verify argument.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *