Permalink
Browse files

Merge pull request #79 from FZambia/patch-1

add timeout kwarg for HTTPClient initialization
  • Loading branch information...
fiorix committed Nov 28, 2012
2 parents 9971dfd + ea2871f commit 05ee4024fe82f0dcf94498c7cbb19452ecea4454
Showing with 1 addition and 0 deletions.
  1. +1 −0 cyclone/httpclient.py
View
@@ -74,6 +74,7 @@ def __init__(self, url, *args, **kwargs):
self.headers = self._kwargs.get("headers", {})
self.body = self._kwargs.get("postdata")
self.method = self._kwargs.get("method", self.body and "POST" or "GET")
+ agent._connectTimeout = self._kwargs.get("timeout", None)
if self.method.upper() == "POST" and \
"Content-Type" not in self.headers:
self.headers["Content-Type"] = \

0 comments on commit 05ee402

Please sign in to comment.