bandit/examples/requests-ssl-verify-disabled.py
Robert Clark b258d08a7c Added missing HTTP verbs to the requests checks
According to http://docs.python-requests.org/en/latest/user/advanced/
requests supports many HTTP verbs, however bandit was checking for
use of only two (post and get) - this patch adds support for the
other verbs that requests supports today.

Change-Id: I57df1f1139def0c3663d2377eabbcbe9ca248146
2015-10-30 15:02:08 +09:00

17 lines
704 B
Python

import requests
requests.get('https://gmail.com', verify=True)
requests.get('https://gmail.com', verify=False)
requests.post('https://gmail.com', verify=True)
requests.post('https://gmail.com', verify=False)
requests.put('https://gmail.com', verify=True)
requests.put('https://gmail.com', verify=False)
requests.delete('https://gmail.com', verify=True)
requests.delete('https://gmail.com', verify=False)
requests.patch('https://gmail.com', verify=True)
requests.patch('https://gmail.com', verify=False)
requests.options('https://gmail.com', verify=True)
requests.options('https://gmail.com', verify=False)
requests.head('https://gmail.com', verify=True)
requests.head('https://gmail.com', verify=False)