Created
August 27, 2013 16:53
-
-
Save buchi/6356122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ThreadedRequest(threading.Thread): | |
def __init__(self, url, data): | |
super(ThreadedRequest, self).__init__() | |
self.url = url | |
self.data = data | |
@log_error | |
def run(self): | |
response = urllib.urlopen(self.url, self.data) | |
response.read() | |
#response = requests.post(self.url, data=self.data) | |
#response.raise_for_status() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
errbit 1.1.0 does now support
urllib
,urllib2
andrequests
(default).The implementation can be set with the environment variable
ERRBIT_HTTP_CLIENT
.