specify http module to use in constructor
add createSecure for https