Handle reading of REST API endpoints that return single resource. Fixes #42

A fix for issue #42.