Source

py-restclient / docs / whatsnew.txt

The default branch has multiple heads

Full commit
.. _whatsnew:


Changes
=======

1.3.1
-----

- Better detection of content encoding
- Make sure we keep the trailing slash

1.3
---

- Detection of file size & type if body object is a file object. Also fix Content-Length for strings
- Code have been refactored. All exceptions are now in :mod:`restclient.errors`. All transports have been splitted in :mod:`restclient.transport`
- curl transport default timeout is now 0.
- some fixes

1.2
---

Encoding:
---------

- unicode urls are now managed
- data get from response is now in unicode if it's not a binary

Fixes:
------

- curl client have been fixed
- new response object that act now as a real dict. You could get all
  headers of the response like this :
 
.. code-block:: python   

    >>> from restclient import Resource
    >>> res = Resource('http://e-engura.org')
    >>> page = res.get()
    >>> res.status
    200
    >>> res.response
    <HTTPResponse status 200 for http://e-engura.org>
    >>> res.response.__dict__
    {'status': 200, 'final_url': 'http://e-engura.org'}
    >>> for i in res.response.items():
    ...     print i
    ... 
    ('status', 200)
    ('content-length', '5448')
    ('final_url', 'http://e-engura.org')
    ('accept-ranges', 'bytes')
    ('server', 'nginx/0.6.31')
    ('last-modified', 'Sun, 28 Dec 2008 23:15:27 GMT')
    ('connection', 'keep-alive')
    ('date', 'Wed, 04 Feb 2009 21:52:14 GMT')
    ('content-type', 'text/html')


.. seealso::

        :ref:`resource_ref`