summaryrefslogtreecommitdiff
path: root/requests/models.py
Commit message (Collapse)AuthorAgeFilesLines
* come out and play!renderKenneth Reitz2016-02-181-1/+1
|
* pretty()Kenneth Reitz2016-02-161-58/+27
|
* cleanupKenneth Reitz2016-02-161-10/+1
|
* Response.dump/dumpsKenneth Reitz2016-02-161-0/+83
|
* PreparedRequest: dump/dumpsKenneth Reitz2016-02-161-5/+18
|
* PreparedRequest.dump(auto_print=True)Kenneth Reitz2016-02-161-2/+13
|
* update PreparedResponse.dumpKenneth Reitz2016-02-161-6/+29
|
* use colors to warn on non sting-like content bodiesKenneth Reitz2016-02-161-1/+13
|
* revised syntax for dump()Kenneth Reitz2016-02-161-9/+19
|
* renamed PreparedRequest.render to dumpKenneth Reitz2016-02-141-1/+1
|
* Revert "Response.render()"Kenneth Reitz2016-02-141-13/+0
| | | | This reverts commit 6cd586dc8ea19f01686d265d97b8bb308f5e0769.
* Response.render()Kenneth Reitz2016-02-141-0/+13
|
* PreparedRequest.render()Kenneth Reitz2016-02-141-0/+15
|
* Fix regression from #2844 regarding binary bodies.Cory Benfield2015-12-161-1/+4
|
* Merge pull request #2896 from BraulioVM/masterIan Cordasco2015-12-021-1/+1
|\ | | | | [WIP] Set 'Transfer-Encoding: chunked' if data is a file with length 0
| * Fix 'Transfer-Encoding: chunked' changeBraulio Valdivielso Martínez2015-11-241-3/+1
| |
| * Set 'Transfer-Encoding: chunked' if data file length equals 0Braulio Valdivielso Martínez2015-11-231-0/+2
| |
* | Fix typosJakub Wilk2015-12-011-2/+2
|/
* fix issue #2844Alex Khomchenko2015-10-231-1/+1
|
* Move to_native_string for methods to prepare()Cory Benfield2015-10-121-1/+1
|
* Use general null check for JSONCory Benfield2015-10-081-1/+1
|
* Merge pull request #2763 from ravipra/json_supersedesCory Benfield2015-10-051-2/+2
|\ | | | | Fixed issue #2756
| * changed the null check for 'data' parameter to be more explicit.Ravi Prakash Putchala2015-09-091-1/+1
| | | | | | | | removed the superfluous encode from the testcase.
| * Fixed issue #2756Ravi Prakash Putchala2015-09-081-2/+2
| | | | | | | | | | Now 'json' parameter will be used to prepare body only if the 'data' parameter is not present
* | Update models.pysumitbinnani2015-10-021-1/+1
|/ | | | Updated Documentation: ```data``` as well as ```files``` supersedes json
* Display URL as part of HTTP error messagesMarc Abramowitz2015-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems convenient to include the URL in the error message in case you get an unexpected error. E.g.: In [1]: import requests In [2]: resp = requests.get('http://www.google.com/eofdfdfdfdfd') In [3]: resp Out[3]: <Response [404]> In [4]: resp.raise_for_status() --------------------------------------------------------------------------- HTTPError Traceback (most recent call last) <ipython-input-4-00e7077cfb5b> in <module>() ----> 1 resp.raise_for_status() /Users/marca/dev/git-repos/requests/requests/models.py in raise_for_status(self) 835 836 if http_error_msg: --> 837 raise HTTPError(http_error_msg, response=self) 838 839 def close(self): HTTPError: 404 Client Error: Not Found for url: http://www.google.com/eofdfdfdfdfd
* fix contextlib.closing bug for sessions where content is not consumed (issue ↵colin2015-05-241-0/+3
| | | | #2593)
* Merge pull request #2598 from Lukasa/not-poorIan Cordasco2015-05-141-4/+7
|\ | | | | Partially revert ab84f9be5740d4649d734e73b84f17f85e52ffc9
| * Use complexjson everywhereCory Benfield2015-05-141-2/+4
| |
| * Partially revert ab84f9be5740d4649d734e73b84f17f85e52ffc9Cory Benfield2015-05-141-2/+3
| |
* | do not blindly catch all AttributeErrorsThomas Weißschuh2015-05-121-3/+4
|/ | | | see shazow/urllib3#618
* Merge remote-tracking branch 'origin/master'Kenneth Reitz2015-05-061-0/+4
|\
| * Simplify PreparedRequest.prepare APIIan Cordasco2015-04-201-0/+4
| | | | | | | | | | | | | | | | Do not require that hooks be passed as an empty list to PreparedRequest.prepare. In the event hooks is None in prepare or prepare_hooks, use an empty list as a default. Related to #2552
* | cleanup styles a bitKenneth Reitz2015-05-061-28/+11
| |
* | removed poor codeKenneth Reitz2015-05-061-3/+2
|/
* Minor formatting changeIan Cordasco2015-04-101-2/+2
|
* fix bug 2540sh1buy2015-04-111-1/+2
|
* Fix bug 2540sh1buy2015-04-111-1/+1
|
* fix bug 2540sh1buy2015-04-111-1/+1
|
* #2532: Documented strange behaviour in "PreparedRequest.prepare_cookies", ↵Smiley Barry2015-04-061-1/+9
| | | | caused by cookielib. Also documented a workaround if absolutely necessary.
* Copy a PreparedRequest's CookieJar reliablyIan Cordasco2015-04-051-2/+2
| | | | | | | | | | | | When a PreparedRequests's cookie jar is not a RequestsCookieJar instance, it will not have a "copy" method. By adding _copy_cookie_jar we can reliably copy cookie jars so that we have an actual copy instead of the same instance on different prepared requests. This also updates the RequestsCookieJar.update logic to create copies of cookies from the other jar. Closes #2527
* Expand on what 'elapsed' means.Cory Benfield2015-03-211-1/+5
|
* Merge pull request #2472 from scholer/masterIan Cordasco2015-03-141-5/+6
|\ | | | | Avoid data duplication when creating a Request with str/bytes/bytearray input
| * Avoid duplicating files data when creating a Request with ↵Rasmus Scholer (TimelineX)2015-03-041-5/+6
| | | | | | | | str/bytes/bytearray in the files argument. 30-40% performance improvement.
* | Document Response.iter_lines() reentrancy issuesPriit Laes2015-03-071-0/+2
|/
* models.RequestEncodingMixin._encode_files now takes bytearray as fp in ↵Rasmus Scholer (TimelineX)2015-03-031-1/+1
| | | | addition to the currently supported bytes and str input.
* Fix error handling on Python 3Ian Cordasco2014-12-161-1/+1
|
* Merge branch 'master' of https://github.com/ContinuousFunction/requests into ↵Ian Cordasco2014-12-161-2/+5
|\ | | | | | | pr/2344
| * Changed ConnectionError to InvalidURLContinuousFunction2014-11-171-1/+1
| |
| * Partially addresses Issue #1572ContinuousFunction2014-11-151-2/+5
| | | | | | | | | | | | | | | | Addresses the LocationParseError but not the DecodeError from kennethreitz#1572. When running test_requests.py, I got an error in test_session_pickling which resulted in a TypeError. I'm not sure of the reason for the TypeError but I have commented out that test.