Fix handling responses without body

When a request isn't successful the response doesn't (may not?) contain
a body.  The previous code caused an AttributeError in such cases by
accessing the 'body' attribute even in such cases.  This commit fixes
the issue by accessing the 'content' attribute.

It also changes the logic to only log the response's content at the
debug level.
Merge pull request #54 from crs4/master

Fix handling responses without body