Function convertHttpToHttps

  • Convert an HTTP URL to an HTTPS URL.

    Usage:

    const ret = convertHttpToHttps('http://example.com');
    console.log(ret);

    Output:

    https://example.com
    

    Parameters

    • url: string

      The HTTP URL to convert to HTTPS.

    Returns string

    The HTTPS URL.