include::../description.adoc[] include::../ask-yourself.adoc[] include::../recommended.adoc[] == Sensitive Code Example ``++httplib++`` module ---- import http.client.HTTPConnection def send_request(url): http.client.HTTPConnection(url) # Sensitive ---- ``++request++`` library ---- import requests def send_request(url, method): requests.request(method, url) # Sensitive requests.get(url) # Sensitive requests.put(url) # Sensitive requests.post(url) # Sensitive requests.patch(url) # Sensitive requests.delete(url) # Sensitive requests.head(url) # Sensitive requests.options(url) # Sensitive ---- Python 2 ``++urllib2++`` ---- import urllib2 url = 'http://www.example.com/' def open_url(url): urllib2.urlopen(url) # Sensitive req = urllib2.Request(url=url, data=b'This is data') urllib2.urlopen(req) # Sensitive opener = urllib2.build_opener(urllib2.HTTPHandler) opener.open(url) # Sensitive ---- Python 3 ``++urllib++`` module ---- import urllib.request url = 'http://www.example.com/' def open_url(url, proxy_handler, proxy_auth_handler, proxies): urllib.request.urlopen(url) # Sensitive req = urllib.request.Request(url=url, data=b'This is data') urllib.request.urlopen(req) # Sensitive opener = urllib.request.build_opener(proxy_handler, proxy_auth_handler) opener.open(url) # Sensitive opener = urllib.request.FancyURLopener(proxies) opener.open(url) # Sensitive urllib.request.urlretrieve(url) # Sensitive ---- include::../see.adoc[] ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::../message.adoc[] ''' == Comments And Links (visible only on this page) include::../comments-and-links.adoc[] endif::env-github,rspecator-view[]