A wrapper that chooses http or https for requests