Added connection timeout check to HTTP client.
Fixed bug in error handling in the HTTP client.
Minor refactoring in the HTTP client.
Simplified the HTTP client, request and response classes.