def METHOD_NAME(request, queryParams):
    if request.method not in ['GET', 'POST']:
        return HttpResponse(status=405)
    exprs = []
    # Normal format: ?expr=tag1=value1&expr=tag2=value2
    if len(queryParams.getlist('expr')) > 0:
        exprs = queryParams.getlist('expr')
    # Rails/PHP/jQuery common practice format: ?expr[]=tag1=value1&expr[]=tag2=value2
    elif len(queryParams.getlist('expr[]')) > 0:
        exprs = queryParams.getlist('expr[]')
    tag = queryParams.get('tag')
    if not tag:
        raise HttpError('no tag specified', status=400)
    return STORE.tagdb_auto_complete_values(
        exprs,
        tag,
        valuePrefix=queryParams.get('valuePrefix'),
        limit=queryParams.get('limit'),
        requestContext=_requestContext(request, queryParams)
    )