Skip to content
Myr

Merge pull request #1654 from riyadparvez/deprecation-removal

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

Deprecation removal and other idiomatic updates

authored by Cory Benfield · committed by Cory Benfield · parents 953b234, 48f59aa · Browse files · 4 files+4 added−4 removed
This commit

State

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

Diff stats

4 files+4 added−4 removed

  • other:+4 added−4 removed

4 files+4 added−4 removed

modified:docs/user/advanced.rst+1 added-1 removed
20 unmodified lines
2122 s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')23 r = s.get("http://httpbin.org/cookies")2425 print r.text25 print(r.text)26 # '{"cookies": {"sessioncookie": "123456789"}}'272829Sessions can also be used to provide default data to the request methods. This
568 unmodified lines
modified:docs/user/quickstart.rst+1 added-1 removed
66 unmodified lines
67 >>> r = requests.get("http://httpbin.org/get", params=payload)6869You can see that the URL has been correctly encoded by printing the URL::7071 >>> print r.url71 >>> print(r.url)72 http://httpbin.org/get?key2=value2&key1=value17374Note that any dictionary key whose value is ``None`` will not be added to the75URL's query string.
344 unmodified lines
modified:requests/__init__.py+1 added-1 removed
21 unmodified lines
22... or POST:2324 >>> payload = dict(key1='value1', key2='value2')25 >>> r = requests.post("http://httpbin.org/post", data=payload)26 >>> print r.text26 >>> print(r.text)27 {28 ...29 "form": {30 "key2": "value2",
47 unmodified lines
modified:requests/models.py+1 added-1 removed
573 unmodified lines
574 except IncompleteRead as e:575 raise ChunkedEncodingError(e)576 except AttributeError:577 # Standard file-like object.578 while 1:578 while True:579 chunk = self.raw.read(chunk_size)580 if not chunk:581 break582 yield chunk
148 unmodified lines