from typing import Dict


def _query_dict_to_qs(dic: Dict[str, str]) -> str:
    """
    {'k1': 'v1', 'k2': 'v2'} -> ?k1=v1&k2=v2
    """
    if not dic:
        return ''
    return '?' + '&'.join(f'{k}={v}' for k, v in dic.items())