def _build_request(host: str, port: str, action: bool, coordinates: list, simplified: bool) -> str:
    """Builds the request string for the routing engine.

    Args:
        host (str): host name/ip.
        port (str): open port of the routing engine.
        action (bool): if true the TSP problem will be solved,
            else the shortest route will be returned.
        coordinates (list): list of lat, lon coordinates.
        simplified (bool): if true the engine will return a simplified list of coordinates,
            else all coordinates will be returned.

    Returns:
        str: the request string.
    """
    coords = ';'.join(
        [str(lon) + ',' + str(lat) for lon, lat in zip(coordinates[0::2], coordinates[1::2])]
    )
    req = 'http://' \
        + host \
        + ':' \
        + port \
        + '/' + ('trip' if action else 'route') + '/v1/driving/' \
        + coords \
        + '?overview=' \
        + ('simplified' if simplified else 'full') \
        + '&geometries=geojson'
    print('Request build: ' + req + '\n')
    return req