Allow secureRequest param to force HTTPS request
More unit tests