abhishek893rai / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

How to put a timeout/time limit on requests #272

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am using this library to fetch analytics data in my python application which 
is desktop based.

How do I put a time limit on the request, so that if there is a problem with 
the internet connection the program does not get stuck in the request.

Original issue reported on code.google.com by m00n.sil...@gmail.com on 25 May 2013 at 5:06

GoogleCodeExporter commented 8 years ago
Set a timeout in the httplib2.Http() object:

  http://httplib2.googlecode.com/hg/doc/html/libhttplib2.html#httplib2.Http

Original comment by jcgregorio@google.com on 29 May 2013 at 5:37