HTTPS: Difference between revisions
Content added Content deleted
(→=={{header|Visual Basic}}==: added Visual Basic example) |
(→{{header|Python}}: Adding in sample with Requests) |
||
Line 636: | Line 636: | ||
from urllib2 import urlopen |
from urllib2 import urlopen |
||
print urlopen('https://sourceforge.net/').read() |
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> |
</lang> |
||