Handling POST by function matching