http|https detection and service url builder