def http_construct(args, unknown):
    """
    Construct the --http <arg> from the args/unknown space -- relevant only for 'purl'.

    :param args:
    :param unknown:
    :return:
    """

    str_http    = ''
    b_httpSpecd = False

    if '--http' in unknown:
        try:
            str_httpArg = unknown[unknown.index('--http')+1]
            unknown.remove('--http')
            unknown.remove(str_httpArg)
        except:
            str_httpArg = ""
        str_http    = '--http %s' % str_httpArg
        b_httpSpecd = True

    if not b_httpSpecd:
        str_serverIP  = "172.17.0.2"
        str_serverPort  = '5010'
        try:
            if args.b_pman:
                str_serverIP    = os.environ['PMAN_PORT_5010_TCP_ADDR']
                str_serverPort  = os.environ['PMAN_PORT_5010_TCP_PORT']
            if args.b_pfioh:
                str_serverIP    = os.environ['PFIOH_PORT_5055_TCP_ADDR']
                str_serverPort  = os.environ['PFIOH_PORT_5055_TCP_PORT']
        except:
            pass
        str_http    = '--http %s:%s/api/v1/cmd/' % (str_serverIP, str_serverPort)

    return str_http