pyguymer3.download¶
- pyguymer3.download(sess, method, url, /, *, cookies=None, headers=None, timeout=10.0, verify=True)[source]¶
Call a URL and return the response
This function performs a HTTP call, with a GET/POST/PUT/HEAD/OPTIONS method, on a URL and returns the response.
- Parameters:
sess (requests.sessions.Session) – the
requestssession to usemeth (str) – the method
url (str) – the URL
cookies (dict, optional) – the cookie jar
headers (dict, optional) – extra headers to send
timeout (float, optional) – the timeout of the GET/POST/PUT/HEAD/OPTIONS request
verify (bool, optional) – verify the server’s certificates
- Returns:
resp – False if unsuccessful or a requests.models.Response if successful
- Return type:
bool, requests.models.Response
Notes
Copyright 2017 Thomas Guymer [1]
References