Python‎ > ‎requests‎ > ‎

requests.ConnectionError


Definition
The method handle the exception to response and request.

Syntax
requests.ConnectioneError

Parameters
N/A

Examples
The request request is subject to the exception of ConnectionError in finding the turtle parameters in the www.pythonlake.com homepage.
>>> import requests
 >>> try:
...     r=requests.get('http://www.pythonlake.com',params='www.pythonlake.com')
...     t=r.text
...     t.find('turtle')
... except:
...     print(e)
...     
103986
>>> 

Comments