from typing import List
import posixpath


def format_path(base: str, components: List[str]) -> str:
    """
    Formats a base and http components with the HTTP protocol and the expected port.
    """
    url = "http://{}:8000/".format(base)

    for component in components:
        url = posixpath.join(url, component)
    return url + "/" if url[-1] != "/" else url