Fixes #3

Handle empty or 0 length HTTP responses properly.
Prevent trying to decode invalid JSON on a successful response.
Added unit tests for empty and 0 length responses.

I think this is what you were looking for in the re-factored solution. 
Let me know if you want any more changes.