When I try to use the DELETE method with the HTTP client, I get:
Traceback (most recent call last):
File "/Users/dking/src/reddit/rdb/rdbclient.py", line 154, in delete
resp = self.http.fetch(req)
File "/usr/local/lib/python2.6/site-packages/tornado/httpclient.py", line 63, in fetch
File "/usr/local/lib/python2.6/site-packages/tornado/httpclient.py", line 372, in _curl_setup_request
KeyError: 'DELETE'
It looks like this is happening here (
http://github.com/facebook/tornado/blob/master/tornado/httpclient.py#L364):
curl_options = {
"GET": pycurl.HTTPGET,
"POST": pycurl.POST,
"PUT": pycurl.UPLOAD,
"HEAD": pycurl.NOBODY,
}
for o in curl_options.values():
curl.setopt(o, False)
curl.setopt(curl_options[request.method], True)
Is this a quick-fix, or does pycurl just not support the method?