support http and https.