Skip to content
Myr

DELETE in place.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 3c32045 · Browse files · 1 file+9 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−6 removed

  • other:+9 added−6 removed

1 file+9 added−6 removed

modified:requests/core.py+9 added-6 removed
123 unmodified lines
124 self.response.content = resp.read()125126 success = True127128 except Exception:128 except RequestException:129 raise RequestException130 131132 elif self.method.lower() == 'put':
16 unmodified lines
149 self.response.headers = resp.info().dict150 self.response.content = resp.read()151152 success = True153 except Exception:154 raise RequestException153 except urllib2.HTTPError:154 self.resonse.status_code = 405155156 except urllib2.HTTPError:157 self.resonse.status_code = 405156 except Exception:157 # TODO: Fix this shit158 raise RequestException159160161 162 elif self.method.lower() == 'post':163 if (not self.sent) or anyway:164 try:
134 unmodified lines
299def delete(url, params={}, headers={}, auth=None):300 """Sends a DELETE request. Returns :class:`Response` object.301 """302 r = Request()301 303304 r.url = url305 r.method = 'DELETE'306 # return response object307 308 r.headers = headers
36 unmodified lines