HTTPS: Difference between revisions

390 bytes added ,  5 years ago
→‎{{header|Python}}: Adding in sample with Requests
(→‎=={{header|Visual Basic}}==: added Visual Basic example)
(→‎{{header|Python}}: Adding in sample with Requests)
Line 636:
from urllib2 import urlopen
print urlopen('https://sourceforge.net/').read()
</lang>
 
 
{{libheader|Requests}}
{{works with|Python|2.7, 3.4–3.7}}
From the Requests documentation: ''"Requests verifies SSL certificates for HTTPS requests, just like a web browser. By default, SSL verification is enabled, and Requests will throw a SSLError if it’s unable to verify the certificate"''
<lang Python>
import requests
print(requests.get("https://sourceforge.net").text)
</lang>
 
Anonymous user