Refactored HTTP client.