Working HTTP and HTTPs via the same client class