Account for empty response bodies

This addresses the issue in #13 using the same solution described by @facultymatt.