Automatically uses http for sandbox, https otherwise