Skip to content
Myr

Small Cleanup

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

authored by Mike Waldner · committed by Mike Waldner · parent 2a17e52 · Browse files · 1 file+4 added−7 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+4 added−7 removed

  • other:+4 added−7 removed

1 file+4 added−7 removed

modified:requests/models.py+4 added-7 removed
351 unmodified lines
352 method_opt = '-X %s ' % self.method.upper()353354 data = ''355 if self.method in ('PUT', 'POST', 'PATCH'):356 #: --data - send specified data in post request.357 #: '-data name=John -data skill=Doe' generates the358 #: post chunk 'name=daniel&skill=lousy'356 #: -d/--data - send specified data in post request.357 #: '-d name=John -d last=Doe' generates the358 #: post chunk 'name=John&last=Doe'359360 #if data is file:360 if isinstance(self.data, (list, tuple)):361 data = data.join(['-d ' + key + '=' + value + ' ' for key, value in self.data])362 else:363 data = '-d ' + self._enc_data + ' '364365 #: Params handled in _build_url367 curl_cmd = curl_cmd + method_opt + data + header + '"' + self._build_url() + '"'366 return curl_cmd + method_opt + data + header + '"' + self._build_url() + '"'367369 return curl_cmd368371369class Response(object):370 """The core :class:`Response <models.Response>` object. All371 :class:`Request <models.Request>` objects contain a372 :class:`response <models.Response>` attribute, which is an instance
227 unmodified lines