http: use different classes for http and https.