Break out RestClient error checking.

This commit breaks out the error checking from the request()
method in RestClient. This allows for the glance_http module
to use the same error checks as RestClient, to keep compatibility
between the 2 modules.

Partially implements blueprint add-glance-api-v1-tests

Change-Id: I0b21c93afcee8e9a22782b12c7b7e1f1ec1ea64c
1 file changed