Handle query via post