Merges params parsed from the URI into the mapping from the POST body and
    returns a new dict with the values.

    This is a convenience function that gives use a dict a bit like PHP's $_REQUEST
    array.  The original 'postmap' is preserved so the caller can identify a
    param's source if necessary.

def merge_query(path, postmap, force_unicode=True):
    """
    Merges params parsed from the URI into the mapping from the POST body and
    returns a new dict with the values.

    This is a convenience function that gives use a dict a bit like PHP's $_REQUEST
    array.  The original 'postmap' is preserved so the caller can identify a
    param's source if necessary.
"""
    if postmap:
        p = postmap.copy()
    else:
        p = {}
    p.update(get_query(path, force_unicode=False))

    if force_unicode:
        p = _unicode(p)
    return p