Skip to content

Instantly share code, notes, and snippets.

@buchi
Created August 27, 2013 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buchi/6356122 to your computer and use it in GitHub Desktop.
Save buchi/6356122 to your computer and use it in GitHub Desktop.
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()
@buchi
Copy link
Author

buchi commented Aug 27, 2013

@jone
Copy link

jone commented Aug 28, 2013

errbit 1.1.0 does now support urllib, urllib2 and requests (default).
The implementation can be set with the environment variable ERRBIT_HTTP_CLIENT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment